Hi -

I wouldn't facet on a "text" field, I tend to use "string" for the reasons
you describe. e.g. Use

   <field name="neighborhood_id" type="string"  indexed="true" stored="true"
multiValued="true"/>
or in your example
  <field name="sensor" type="string" indexed="true" stored="true"
multiValued="true"/>

If I have multiple values, I add them as separate occurrences of the field I
am faceting on.

If you still need them all in one field for other reasons, use copyField to
assemble them.

Tom

On 8/30/07, Giri <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I am trying to get the facet values from a field that contains multiple
> words, for example:
>
> I have a field "keywords"
>
> and values for this: Keywords=  relative humidity, air temperature,
> atmospheric moisture
>
> Please note: I am combining multiple keywords in to one single field, with
> comma delimiter
>
> When I query for facet, I am getting some thing like:
>
> - relative (10)
>
> - humidity (10)
>
> - temperature (5)
>
>
> But I really need to display:
>
> - relative humidity(10)
>
> - air temperature(5)
>
>
> How can I do this? I know I am missing something in my schema field type
> declaration. I would appreciate if any one can post me an example schema
> field type that can handle this.
>
> Thanks!
>
>
> Here is my schema excerpt:
>
>    <fieldtype name="text" class="solr.TextField"
> positionIncrementGap="100">
>
>       <analyzer type="index">
>
>           <tokenizer class="solr.WhitespaceTokenizerFactory"/>
>
>           <!-- in this example, we will only use synonyms at query time
>
>           <filter class="solr.SynonymFilterFactory"
> synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/>
>
>           -->
>
>           <filter class="solr.WordDelimiterFilterFactory"
> generateWordParts="1"/>
>
>           <filter class="solr.StopFilterFactory" ignoreCase="true"/>
>
>           <filter class="solr.LowerCaseFilterFactory"/>
>
>       </analyzer>
>
>       <analyzer type="query">
>
>           <tokenizer class="solr.WhitespaceTokenizerFactory"/>
>
>           <filter class="solr.StopFilterFactory" ignoreCase="true"/>
>
>           <filter class="solr.LowerCaseFilterFactory"/>
>
>       </analyzer>
>
>     </fieldtype>
>
>
>
> And, the I declared the field as:
>
> <field name="sensor" type="text" indexed="true" stored="true"/>

Reply via email to