used additional field as facet field

I added additional field ,using datastore crawler, and used as facet field but get errors.
Do I need something else for using facet?


#api query

IllegalArgumentException[Fielddata is disabled on text fields by default. Set fielddata=true on [addeddfield] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead.];

#created mapping
addeddfield: {
type: “text”,
fields: {
keyword: {
type: “keyword”,
ignore_above: 256

I think that type should be keyword, but what should I do?


In this way I did what I wanted to do


//mod query

should I close this?

use facet result in search query

To add own field, you need to add a proper elasticsearch mapping before crawling.
Elasticsearch requires fielddata=true for aggregation.

OK, I see


How to show additional facets in the search results of the search GUI. I can see the additional facets in JSON results using &facet.field=xxx. I have tried to add in [“xxx”] as stated in Custom facets. But I still can’t see the additional facets in the search results. Am I missing some settings.

An example setting is in
In the latest version, you can set the settings in
organization,repository and filename are additional facet fields.

I can see my new facet data in the JSON results, but not in the web GUI. What is the difference between “/json” and “/search”?

What did you modify?