I have a users index in that there is a field called groupName that have value like "ad-users" when I query to match how many users belong to "ad-users" groupName. Upon querying to match on groupName I got no results. Here is my query
Please guide me on what I am doing wrong?
Welcome to our community!
How is that field mapped?
Also please be aware that 6.8 is EOL and you should be looking to upgrade ASAP.
Thank you for your warm welcome.
Upgrading to latest version is in pipeline.
groupName field mapping is like this
Seems a bit inconsistent (
ad-users). Can you show a sample document you expect to match?
I have edited the post to be consistent. Sorry for any confusion.
"name": "Mike Bankert",
Above is one of document, but I have more users in my index.
That document does not have the
isServiceAccout field, so should not match the query.
The document I mention above is one of the many users. That doc does not have isServiceAccount field but there are many others docs which have isServiceAccount .
memberOf.groupName is a multi-field and if you use
memberOf.groupName, it is of type
text. The default analyser being used is the standard analyzer which removes punctuation (so the
- character is being removed during tokenisation). You can verify the same by using the analyze API. For example:
"analyzer" : "standard",
"text" : "ad-users"
If you want to perform an exact match, then you will need to use
keyword fields are not analysed). Otherwise, you will need to use a different analyser to meet your requirements.
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.