HI,


I am working on OpenNLP integration with SOLR. I have successfully applied
the patch (LUCENE-2899-x.patch) to latest SOLR source code (branch_4x).

I have designed OpenNLP analyzer and index data to it. Analyzer declaration
in schema.xml is as



  <fieldType name="nlp_type" class="solr.TextField"
positionIncrementGap="100">

                                <analyzer type="index">

                                <!-- Sequence of tokenizers and filters
applied at the index time-->

                                <tokenizer
class="solr.StandardTokenizerFactory"/>

                                <filter
class="solr.LowerCaseFilterFactory"/>

                                <filter class="solr.StopFilterFactory"
ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true"/>

                                <filter class="solr.SynonymFilterFactory"
synonyms="synonyms.txt" ignoreCase="true" expand="true"/>

                                <filter
class="solr.SnowballPorterFilterFactory"/>

                                <filter
class="solr.ASCIIFoldingFilterFactory"/>

                                </analyzer>

                                <analyzer type="query">

                                <!-- Sequence of tokenizers and filters
applied at the index time-->

                                <tokenizer
class="solr.StandardTokenizerFactory"/>

                                <filter class="solr.OpenNLPFilterFactory"
posTaggerModel="opennlp/en-pos-maxent.bin"/>

                                <filter class="solr.OpenNLPFilterFactory"
nerTaggerModels="opennlp/en-ner-person.bin"/>

                                 <filter class="solr.OpenNLPFilterFactory"
nerTaggerModels="opennlp/en-ner-location.bin"/>

                                <filter
class="solr.LowerCaseFilterFactory"/>

                                <filter class="solr.StopFilterFactory"
ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true"/>

 </analyzer>

</fieldType>



And field declared for this analyzer:

<field name="Detail_Person" type="nlp_type" indexed="true" stored="true"
omitNorms="true" omitPositions="true"/>



Problem is here : When I search over this field Detail_Person, results are
not constant.



When I search Detail_Person:brett, it return one document





But again when I fire the same query, it return zero document.



Searching is not stable on OpenNLP field, sometimes it return documents and
sometimes not but documents are there.

And if I search on non OpenNLP fields, it is working properly, results are
stable and correct.

Please help me to make solr results consistent.

Thanks in Advance.

Reply via email to