0

I am using term vector component in solr for building tag cloud. I am also using porter-stem factory for stemming at index and query time both.

The problem is term vector gives shows stemmed words in final output with term frequency. Example :- If I search for the word 'communication' it gives me term frequency of 'commune', but i need communication. I need stemming only for querying not in term vector. How can i stop this ?

user199354
  • 505
  • 1
  • 5
  • 17

1 Answers1

0

You can create a copy field that doesn't have stemming and query that field to generate your tag cloud.

for example, assuming your current field is called my_text, you may have something like this:

First define a new field:

<field name="my_text_2" type="my_text_type_2" indexed="true" stored="false" termVectors="true"/>

Then copy your text to it at write time:

<copyField source="my_text" dest="my_text_2"/>

where my_text_type_2 is the field type where you can set what analyzers you need. It may be a copy of the current field type used for my_text but without the stemming.

MoustafaAAtta
  • 1,011
  • 12
  • 17