lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lance Norskog <goks...@gmail.com>
Subject Re: dealing with dash chars in fields when using dismax
Date Sun, 13 Jun 2010 22:26:16 GMT
There will always be edge cases and the parser cannot be all things to
all people. Most applications have an application layer that create
the actual Solr query, and that is where you'll have to handle this
one.

On Sun, Jun 13, 2010 at 8:25 AM, Lukas Kahwe Smith <mls@pooteeweet.org> wrote:
>
> On 13.06.2010, at 17:20, Erick Erickson wrote:
>
>> <<<but still is there some clean solution that doesnt mean a lot of coding
>> work on my end to handle dash both as a special and as a normal char.>>>
>>
>> And how would the code know? You're essentially asking for DWIM (Do What I
>> Mean) functionality, which I've been awaiting for many years....
>>
>> It seems a reasonable approach would be to have your power users understand
>> they needed to escape hyphens. Or introduce your own syntax for negation
>> which would be a simple string substitution on the way through. Or.....
>> Because somewhere you need some external input that distinguishes between "I
>> mean this hyphen to be a negation, but this other one to be a literal".
>>
>> If this seems irrelevant, then I'm missing your point pretty badly. A use
>> case or two where this distinction is important would be helpful. Or is that
>> use-case <G>?
>
>
> No, I was just wondering if someone by chance implemented the DWIM I want :)
> But I guess for now I will just escape, since we do not advertise + and - syntax anyway
atm.
> Then again more and more people are learning how it works in google and are starting
to just try it out when they are doing searches.
>
> What I might end up doing though is not escape dashes only in specific cases:
> foo-bar (escape)
> foo - bar (escape)
> foo -bar (not escape, aka probihit bar)
>
> This should enable power users and should rarely hit non power users.
>
> regards,
> Lukas Kahwe Smith
> mls@pooteeweet.org
>
>
>
>



-- 
Lance Norskog
goksron@gmail.com

Mime
View raw message