lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Thomsen <mikerthom...@gmail.com>
Subject Exact phrase search not working
Date Thu, 11 Jun 2015 16:14:13 GMT
This is my field definition:

<fieldType name="text_en_splitting" class="solr.TextField"
positionIncrementGap="100" autoGeneratePhraseQueries="true">
    <analyzer type="index">
        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
        <filter class="solr.LowerCaseFilterFactory"/>
        <filter
class="com.lucidworks.analysis.AutoPhrasingTokenFilterFactory"
collection="default-collection" includeTokens="true"
replaceWhitespaceWith="_"/>
        <filter class="solr.StopFilterFactory"
                ignoreCase="true"
                words="lang/stopwords_en.txt"
                enablePositionIncrements="true"
                />
        <filter class="solr.LowerCaseFilterFactory"/>
        <filter class="solr.KeywordMarkerFilterFactory"
protected="protwords.txt"/>
        <filter class="solr.HunspellStemFilterFactory"
                dictionary="en_US.dic"
                affix="en_US.aff"
                ignoreCase="false"
                longestOnly="false" />
    </analyzer>
    <analyzer type="query">
        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
        <filter class="solr.LowerCaseFilterFactory"/>
        <filter
class="com.lucidworks.analysis.AutoPhrasingTokenFilterFactory"
collection="default-collection" includeTokens="true"
replaceWhitespaceWith="_"/>
        <filter class="solr.LowerCaseFilterFactory"/>
        <filter class="solr.ManagedSynonymFilterFactory" managed="english"
/>
        <filter class="solr.KeywordMarkerFilterFactory"
protected="protwords.txt"/>
        <filter class="solr.HunspellStemFilterFactory"
                dictionary="en_US.dic"
                affix="en_US.aff"
                ignoreCase="false"
                longestOnly="false" />
    </analyzer>
</fieldType>

Then I query for this exact phrase (which I can see in various documents)
and get no results...

my_field: "baltimore police force"

This is the output of the debugQuery part of the result set.

"rawquerystring": "\"baltimore police force\"",
    "querystring": "\"baltimore police force\"",
    "parsedquery": "PhraseQuery(search_text:\"baltimore ? police ? ? force\")",
    "parsedquery_toString": "search_text:\"baltimore ? police ? ? force\"",
    "QParser": "LuceneQParser",

Thanks,

Mike

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