[Feature request] Support to index only some of the fields of the entire document

Hello,

We need to save in the engine the whole document because later on it will be returned to the client, but for the sake of search relevance we want to index only a couple of properties/fields from the entire document.

I'm thinking that could be easily fixed, from our point of view, with a (child) property/field in the schema or in the document that tells the API if the property/field should be indexed or not. By default all the properties of the document should be indexed, like now.

I was told that such a feature is supported in the ES, but not in the EES:
https://discuss.elastic.co/t/how-to-index-only-some-of-the-fields-of-the-entire-document/323910

Thanks,
Lucian

1 Like

Hi there @lnaie

Yes they are correct, its not possible to specify which fields should be searchable or not. This option is only available in Elasticsearch.

There is an option however to use Elasticsearch indices for App Search in the latest version of App Search. Here you can control the schema for your fields via an elasticsearch index but use App Search and the APIs to query.

Read more on this feature here: Create Elasticsearch index engines | Elastic App Search Documentation [8.6] | Elastic

Hope this helps!

1 Like

Hi,

Thanks for providing this solution.

We think we need this because, from our tests, it seems that all the document fields count towards the search score, even if the fields are not specified in the api search query target fields.
Can you confirm this?

Thanks

As long as you are specifying the fields that you want to search at query time, the the query combines term and collection statistics across the fields specified to score each match. You must either toggle off the fields you dont want searchable via relevance tuning page or at query time otherwise it will search all fields by default.

Hope this helps!

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.