I have an index like the below:
[
{
"startDateTime": "2023-04-13 02:10:51",
"eventType": "Book",
"event": "ABC Launch",
"authors": "Nick Leeson",
"startTime": 1681351851,
"eventID": 100
},
{
"startDateTime": "2023-04-13 02:13:00",
"eventType": "Book",
"event": "XYZ Launch",
"authors": "John Davidson",
"startTime": 1681351980,
"eventID": 101
},
{
"startDateTime": "2023-04-13 04:26:20",
"eventType": "Book",
"event": "NEW Launch",
"authors": "Nicole Swift",
"startTime": 1681359980,
"eventID": 102
},
{
"startDateTime": "2023-04-13 07:13:00",
"eventType": "Book",
"event": "Kids Launch",
"authors": "Timothy Smith",
"startTime": 1681369980,
"eventID": 103
}
]
When I try to search by “authors” using java sdk, no results are returned. My code looks like:
Query query = new Query("authors");
query.setFilters("authors:'John Davidson'");
SearchResult<?> result = index.search(query);
The above result returns 0 hits. However the below query works:
Query query = new Query("authors");
query.setQuery("John Davidson");
SearchResult<?> result = index.search(query);
Can anyone please help me to understand what could be the issue? Also if I want to search multiple authors in a single query how can I do that?
Thanks