lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erick Erickson <erickerick...@gmail.com>
Subject Re: word proximity and queryoperator OR
Date Fri, 02 Sep 2011 14:44:26 GMT
I think you're searching for both tokens, but do what Markus said first,
add &debugQuery=on to your query and you'll see exactly what the
search is.

You are searching against your default text field because you have not
specified any field in your query, is that what you expect?

You could add something like OR "iphone 4"^5 which will boost
documents with iphone and 4 right next to each other (experiment
with the boost number). This can be done with (e)dismax easily with
the pf (phrase fields) parameter.

Also, take a look at the admin/analysis page. It'll help you figure
out what each of the various elements of your analysis chain are doing. It's
invaluable...

Best
Erick

On Wed, Aug 31, 2011 at 11:15 PM, abhayd <ajdabholkar@hotmail.com> wrote:
>
> hi
> i dont understand why though.
>
> here is my displayName filed type "text"
>
>
>    <fieldType name="text" class="solr.TextField" positionIncrementGap="100">
>      <analyzer type="index">
>        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
>        <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true"
expand="true"/>
>        <!-- Case insensitive stop word removal.
>             enablePositionIncrements=true ensures that a 'gap' is left to
>             allow for accurate phrase queries.
>        -->
>        <filter class="solr.StopFilterFactory"
>                ignoreCase="true"
>                words="stopwords.txt"
>                enablePositionIncrements="true"
>                />
>        <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1"
catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"/>
>        <filter class="solr.LowerCaseFilterFactory"/>
>        <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
>      </analyzer>
>      <analyzer type="query">
>        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
>        <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true"
expand="true"/>
>        <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
>        <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1"
catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"/>
>        <filter class="solr.LowerCaseFilterFactory"/>
>        <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
>      </analyzer>
>    </fieldType>
>
>
> why would search term not be "iphone 4" and only "iphone"
>
> Synonyms.txt
> iphone 4, itouch
>
> thanks
> abhay
> Date: Wed, 31 Aug 2011 16:57:48 -0700
> From: ml-node+3299919-1944219593-210077@n3.nabble.com
> To: ajdabholkar@hotmail.com
> Subject: RE: word proximity and queryoperator OR
>
>
>
>        You might want to check your analyzers in schema.xml. It appears numbers are
filtered out.
>
>
> So basically you are searching for "iphone" instead of "iphone 4"
>
>
>
>
>
>
>
>
>
>
>                If you reply to this email, your message will be added to the
discussion below:
>                http://lucene.472066.n3.nabble.com/word-proximity-and-queryoperator-OR-tp3299729p3299919.html
>
>
>
>                To unsubscribe from word proximity and queryoperator OR, click
here.
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/word-proximity-and-queryoperator-OR-tp3299729p3300214.html
> Sent from the Solr - User mailing list archive at Nabble.com.

Mime
View raw message