What is the alternative way of querying _all?

From elasticsearch 6.x _all has been deprecated. I have a matchQuery like below

                        .should(QueryBuilders.matchQuery("_all", typeAndName.name))
                                dataModel.getLowerFieldName(PropertyType.STRING, SearchFields.kObjectNameKey),

Can someone suggest someway what is the recommended way of doing the same now?

I am using dynamic mapping. So as mentioned in doc I don't know beforehand what all fields can be there in the index so I cannot use copy_to in index mapping to copy all fields data to some other field to simulate all.

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