[TYPO3-Solr] jumbled facets
Michael McManus
michaelorionmcmanus at gmail.com
Tue Jan 17 18:48:17 CET 2012
Aha! Got it.
Thanks, Ingo. This makes perfect sense.
Definitely some new terminology to learn here. I'm excited to dig into
this.
Best,
Michael
Cast Iron Coding
Ingo Renner wrote:
> Am 17.01.12 02:52, schrieb Michael Mcmanus:
>
> Hi Michael,
>
>> I've configured a mutivalue field, in an indexer. I've followed the
>> tt_news example for the keywords fields and my TS looks like this:
>>
>> keywords = SOLR_MULTIVALUE
>> keywords {
>> field = keywords
>> }
>>
>> The records appear to get indexed properly. Querying Solr directly,
>> yields a response like this:
> ...
>> When I try to query for facets, the "keywords" values get all jumbled.
> ...
>> Produces this result:
> ...
>> So, "Photography" gets turned into "photographi", "explosion" becomes
>> "explos," etc...
>
> That behavior is correct basically. The keywords field is of type
> "text", text is a field type that uses stemming, thus the "jumbled" results.
>
> For facets I recommend to use field types that do not do stemming, like
> string. Since you don't want to modify the schema you just use a dynamic
> field:
>
> keywords_stringM = SOLR_MULTIVALUE
> keywords_stringM {
> field = keywords
> }
>
> Now just use that keywords_stringM field to create the facet.
>
> So "keywords" is a name you can choose on your own, then it is followed
> by an underscore (_) to separate the name from the type, "string" is the
> type and lastly "M" marks a multivalue field, whereas "S" would be
> single value.
>
> You can have a look at the end in
> EXT:solr/resources/solr/typo3cores/conf/general_schema_fields.xml for
> all the dynamic field types that are available.
>
>
> best
> Ingo
>
More information about the TYPO3-project-solr
mailing list