Closed rjdkolb closed 1 year ago
Thanks @rjdkolb! Currently investigating. Can you do me a favor and capture the commands that are being sent to Redis by running the Redis CLI is monitor mode? redis-cli MONITOR
?
Pleasure :)
For Search3 I get:
1675437670.689313 [0 172.17.0.1:60888] "FT.SEARCH" "com.redis.om.documents.domain.CompanyIdx" "*co*" "LIMIT" "0" "10000"
For Search 4 I get:
1675437762.647725 [0 172.17.0.1:60890] "FT.SEARCH" "com.redis.om.documents.domain.CompanyIdx" "(*co* @name:{Microsoft})" "LIMIT" "0" "10000"
Looks like a bug!
@bsbodden If you haven't already found the fix; may I contribute for this one please?
@setu9760 , I am happy to verify the fix. :)
@setu9760 and @rjdkolb please! It was on my current list but haven't gotten to it yet! Thank you!
@rjdkolb FYI the chaining of filters implies and "AND" so on the search above you should get no results based on the sample data. For an "OR" you can do:
List<Company> companies = stream //
.filter( //
Company$.NAME.eq("RedisInc") //
.or(Company$.NAME.eq("Microsoft")) //
) //
.collect(Collectors.toList());
@setu9760 if you haven't figure out a fix, I have simple one.
thanks @bsbodden , I saw there was a copy and paste error with my example. I updated search4.
var result4 = entityStream.of(Company.class)
.filter("*net*")
.filter(Company$.NAME.eq("Microsoft"))
.collect(Collectors.toList());
System.out.println("Search4:");
result4.forEach(System.out::println);
Both Search3 and Search4 examples work correctly now.
maven version: 0.6.4
If you search for on a field first and on then on free text, the field part of the query is dropped.
So this does not work as it returns data not for Microsoft:
This works:
I found this when I was looking in JRediSearch io.redisearch.client.Client
My data based on the roms-documents, I modified RomsDocumentsApplication
Stackoverflow question.