Let's back up here because now I'm not clear what you actually want.
EdgeNGrams
are a way of matching substrings, which is what's happening here. Of course
searching "apple" against any of the three examples, just as searching for
"apple"
without grams would match, that's the expected behavior.

So, we need a clear problem definition of what you're trying to do, along
with
example queries (please post the results of adding &debugQuery=on).

Best
Erick

On Tue, Jan 25, 2011 at 8:29 AM, johnnyisrael <johnnyi.john...@gmail.com>wrote:

>
> Hi Eric,
>
> You are right, there is a copy field to EdgeNgram, I tried the
> configuration
> but it not working as expected.
>
> Configuration I tried:
>
> ================================================
>
> <fieldType name=”query” class=”solr.TextField” positionIncrementGap=”100″
> termVectors=”true”>
> <analyzer type=”index”>
> <tokenizer class=”solr.StandardTokenizerFactory”/>
> <filter class=”solr.LowerCaseFilterFactory”/>
> </analyzer>
> <analyzer type=”query”>
> <tokenizer class=”solr.StandardTokenizerFactory”/>
> <filter class=”solr.LowerCaseFilterFactory”/>
> </analyzer>
> </fieldType>
>
> <fieldType name=”edgytext” class=”solr.TextField”
> positionIncrementGap=”100″>
> <analyzer type=”index”>
> <tokenizer class=”solr.WhitespaceTokenizerFactory”/>
> <filter class=”solr.LowerCaseFilterFactory”/>
> <filter class=”solr.EdgeNGramFilterFactory” minGramSize=”3″
> maxGramSize=”25″/>
> </analyzer>
> <analyzer type=”query”>
> <tokenizer class=”solr.KeywordTokenizerFactory”/>
> <filter class=”solr.LowerCaseFilterFactory”/>
> </analyzer>
> </fieldType>
>
> <field name=”user_query” type=”query” indexed=”true” stored=”true”
> omitNorms=”true” omitTermFreqAndPositions=”true” />
> <field name=”edgy_user_query” type=”edgytext” indexed=”true” stored=”true”
> omitNorms=”true” omitTermFreqAndPositions=”true” />
>
> <defaultSearchField>edgy_user_query</defaultSearchField>
> <copyField source=”user_query” dest=”edgy_user_query”/>
>
> ======================================
>
> When I search for the term "apple".
>
> It is returning results for "pineapple vers apple", "milk with apple",
> "apple milk shake" ...
>
> Is there any other way to overcome this problem?
>
> Thanks,
>
> Johnny
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/EdgeNgram-Auto-suggest-doubles-ignore-tp2321919p2329370.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Reply via email to