0
votes

I have added the documents into the solr using the solr client java API Consider 2 fields, field1 | field2 [email protected] value1

I was able to successfully index the documents.

In the solr admin UI when i executed the query i was able to see 1 record with these above values.

In the admin UI I have enabled Facet on this field and try to execute the query. But i got result in splitted values as shown below

Checked the facet checkbox and in the facet.field = owner and then clicked execute query got the below result

"facet_counts":{
"facet_queries":{},
"facet_fields":{
  "owner":[
    "com",1,
    "test",1,
    "aaa",1]},
"facet_ranges":{},
"facet_intervals":{},
"facet_heatmaps":{}}}

If you see in the above result i got splited string how to get that in single output [email protected] , 1

Please help me on this

1

1 Answers

0
votes

The facets are generated from the tokens for the field. If you're using a text based field with a tokenizer attached, the value will be split into multiple tokens.

To get the behavior you want, use a string field and reindex your content to that field. Use a copyField instruction if you still want to be able to search with partial content against the field, and facet on the new field instead.