lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From deepak agrawal <dk.a...@gmail.com>
Subject Problem with text field in Solr
Date Fri, 15 Jan 2010 10:45:40 GMT
HI,

I am using Solr in which I have BODY field as text.
But when i am searching with BODY having word like *aviation*

when i am Searching *BODY:avia** (aviation is coming)
when i am Searching *BODY:aviat** (aviation is coming)
when i am searching *BODY:aviati** (aviation is not coming)
when i am searching *BODY:aviatio** (aviation is not coming)
when i am searching *BODY:aviation** (aviation is not coming)

Please help me how  can i search these type of world with (*aviati*,**
aviatio*,**aviation**)

Below is the detail of How we are using BODY with Text.

*<field name="BODY" type="text" indexed="true" stored="true"
multiValued="true" termVectors="true"/>*

<fieldType name="text" class="solr.TextField" positionIncrementGap="100">
      <analyzer type="index">
        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
        <!-- in this example, we will only use synonyms at query time
        <filter class="solr.SynonymFilterFactory"
synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/>
        -->
        <!-- 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.EnglishPorterFilterFactory"
protected="protwords.txt"/>
        <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="0"
catenateNumbers="0" catenateAll="0" splitOnCaseChange="1"/>
        <filter class="solr.LowerCaseFilterFactory"/>
        <filter class="solr.EnglishPorterFilterFactory"
protected="protwords.txt"/>
        <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
      </analyzer>
    </fieldType>

-- 
DEEPAK AGRAWAL
+91-9379433455
GOOD LUCK.....

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message