You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Avlesh Singh <av...@gmail.com> on 2009/09/23 08:53:24 UTC

Highlighting not working on a prefix_token field

I have a "prefix_token" field defined as underneath in my schema.xml

<fieldType name="prefix_token" class="solr.TextField"
positionIncrementGap="1">
    <analyzer type="index">
        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
        <filter class="solr.LowerCaseFilterFactory" />
        <filter class="solr.EdgeNGramFilterFactory" minGramSize="1"
maxGramSize="20"/>
    </analyzer>
    <analyzer type="query">
        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
        <filter class="solr.LowerCaseFilterFactory" />
    </analyzer>
</fieldType>

Searches on the field work fine and as expected.
However, attempts to highlight on this field does not yield any results.
Highlighting on other fields work fine.

Any clues? I am using Solr 1.3

Cheers
Avlesh

Re: Highlighting not working on a prefix_token field

Posted by Avlesh Singh <av...@gmail.com>.
>
> I'm sorry I don't understand the question. Do you mean to say that
> highlighting works with one but not with another?
>
Yes.

Cheers
Avlesh

On Wed, Sep 23, 2009 at 12:59 PM, Shalin Shekhar Mangar <
shalinmangar@gmail.com> wrote:

> On Wed, Sep 23, 2009 at 12:31 PM, Avlesh Singh <av...@gmail.com> wrote:
>
> > Hmmm .. But ngrams with KeywordTokenizerFactory instead of the
> > WhitespaceTokenizerFactory work just as fine. Related issues?
> >
> >
> I'm sorry I don't understand the question. Do you mean to say that
> highlighting works with one but not with another?
>
> --
> Regards,
> Shalin Shekhar Mangar.
>

Re: Highlighting not working on a prefix_token field

Posted by Shalin Shekhar Mangar <sh...@gmail.com>.
On Wed, Sep 23, 2009 at 12:31 PM, Avlesh Singh <av...@gmail.com> wrote:

> Hmmm .. But ngrams with KeywordTokenizerFactory instead of the
> WhitespaceTokenizerFactory work just as fine. Related issues?
>
>
I'm sorry I don't understand the question. Do you mean to say that
highlighting works with one but not with another?

-- 
Regards,
Shalin Shekhar Mangar.

Re: Highlighting not working on a prefix_token field

Posted by Avlesh Singh <av...@gmail.com>.
Hmmm .. But ngrams with KeywordTokenizerFactory instead of the
WhitespaceTokenizerFactory work just as fine. Related issues?

Cheers
Avlesh

On Wed, Sep 23, 2009 at 12:27 PM, Shalin Shekhar Mangar <
shalinmangar@gmail.com> wrote:

> On Wed, Sep 23, 2009 at 12:23 PM, Avlesh Singh <av...@gmail.com> wrote:
>
> > I have a "prefix_token" field defined as underneath in my schema.xml
> >
> > <fieldType name="prefix_token" class="solr.TextField"
> > positionIncrementGap="1">
> >    <analyzer type="index">
> >        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
> >        <filter class="solr.LowerCaseFilterFactory" />
> >        <filter class="solr.EdgeNGramFilterFactory" minGramSize="1"
> > maxGramSize="20"/>
> >    </analyzer>
> >    <analyzer type="query">
> >        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
> >        <filter class="solr.LowerCaseFilterFactory" />
> >    </analyzer>
> > </fieldType>
> >
> > Searches on the field work fine and as expected.
> > However, attempts to highlight on this field does not yield any results.
> > Highlighting on other fields work fine.
> >
>
>
> Won't work until SOLR-1268 comes along.
>
>
> http://www.lucidimagination.com/search/document/4da480fe3eb0e7e4/highlighting_in_stemmed_or_n_grammed_fields_possible
>
> --
> Regards,
> Shalin Shekhar Mangar.
>

Re: Highlighting not working on a prefix_token field

Posted by Shalin Shekhar Mangar <sh...@gmail.com>.
On Wed, Sep 23, 2009 at 12:23 PM, Avlesh Singh <av...@gmail.com> wrote:

> I have a "prefix_token" field defined as underneath in my schema.xml
>
> <fieldType name="prefix_token" class="solr.TextField"
> positionIncrementGap="1">
>    <analyzer type="index">
>        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
>        <filter class="solr.LowerCaseFilterFactory" />
>        <filter class="solr.EdgeNGramFilterFactory" minGramSize="1"
> maxGramSize="20"/>
>    </analyzer>
>    <analyzer type="query">
>        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
>        <filter class="solr.LowerCaseFilterFactory" />
>    </analyzer>
> </fieldType>
>
> Searches on the field work fine and as expected.
> However, attempts to highlight on this field does not yield any results.
> Highlighting on other fields work fine.
>


Won't work until SOLR-1268 comes along.

http://www.lucidimagination.com/search/document/4da480fe3eb0e7e4/highlighting_in_stemmed_or_n_grammed_fields_possible

-- 
Regards,
Shalin Shekhar Mangar.