Closed Suvink closed 2 months ago
It should work, don't see anything weird in the code that would prevent the field from getting indexed. The field in the entity must have a getter/setter as per JavaBean conventions. And you can drop the @Indexed
from the id field, but other than that it looks fine.
@Suvink did you resolve this?
Observed behaviour
I have the following Document model:
When I start my server up, I observe the following index being created from the Redis Insights profiler:
Note that this does not include the
authorizationCodeValue
field.Then I've defined a repository method to fetch an object by the
authorizationCodeValue
:When I execute this method, it returns empty and I observe the following query being executed in the profiler:
Note that the actual search query is empty.
However, when I add
@Searchable
annotation to the model in addition to the@Indexed
annotation, I see the index correctly being configured and the query being constructed properly. I did not use@Searchable
because I don't have a requirement for full-text capabilities and just want to match the entire value.Expected behaviour
When a field is annotated with
@Indexed
annotation, the correct index and the search query should be created.Additional Info:
0.8.6
3.3.2
7.2.5