You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by escher2k <es...@yahoo.com> on 2007/05/05 03:40:54 UTC

OR condition in search...

Is is possible to specify that a term to be looked up in alternate ways"  -
e.g.
search = "3 D" OR "3D" ? Reason being, by default, a search for "3D" is
being split
into "3 D".

Thanks.
-- 
View this message in context: http://www.nabble.com/OR-condition-in-search...-tf3695012.html#a10332814
Sent from the Solr - User mailing list archive at Nabble.com.


Re: OR condition in search...

Posted by Chris Hostetter <ho...@fucit.org>.
: is causing the interpretation to be the way it is. In certain cases, where
: the typed in field might
: have user name such as "kathy_k", we want it to look for the exact
: expression in addition to
: what the Analyzer does.

i don't know that i understand your question ... if the analyzer is
splitting kathy_k up into two seperate tokens at index time, then you
really *don't* want it to search for "the exact expression" at search
time, becuase you wont' find it, because it hasn't been indexed ... you
want your query time analyzer to be compatible with your index time
analyzer.

what does make sense sometimes is to index more then you search on ... ie:
use WordDelimiterFilter when indexing to index all three tokens:
"kathy_k", "kathy", "k"; and at query time you don't use that FIlter (or
use it with differnet params) so that you'll get a match if a user
searches for "kathy" "kathy_k" or "kathy k"




-Hoss


Re: OR condition in search...

Posted by escher2k <es...@yahoo.com>.
Hoss,
  This is not entirely related to the previous question. I know that the
Analyzer configuration
is causing the interpretation to be the way it is. In certain cases, where
the typed in field might
have user name such as "kathy_k", we want it to look for the exact
expression in addition to 
what the Analyzer does.


Chris Hostetter wrote:
> 
> 
> : search = "3 D" OR "3D" ? Reason being, by default, a search for "3D" is
> : being split
> : into "3 D".
> 
> these seems to relate to your other recent question ... Solr is not
> splitting "3D" into "3 D" by default at query time just for hte hell of it
> ... it's doing that because it's what the analyzer configured for your
> fieldtype says it should do .. change your schema.xml to use a differnet
> analyzer, and you'll get differnet behavior (not just when indexing, but
> when querying too)
> 
> 
> 
> -Hoss
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/OR-condition-in-search...-tf3695012.html#a10361670
Sent from the Solr - User mailing list archive at Nabble.com.


Re: OR condition in search...

Posted by Chris Hostetter <ho...@fucit.org>.
: search = "3 D" OR "3D" ? Reason being, by default, a search for "3D" is
: being split
: into "3 D".

these seems to relate to your other recent question ... Solr is not
splitting "3D" into "3 D" by default at query time just for hte hell of it
... it's doing that because it's what the analyzer configured for your
fieldtype says it should do .. change your schema.xml to use a differnet
analyzer, and you'll get differnet behavior (not just when indexing, but
when querying too)



-Hoss