You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently - not directly, although it might change soon.
But you can do it in conjunction with the auto-suggestion API. What you can do is build a dictionary with FT.SUGADD, and get prefix suggestions with FT.SUGGET, and pass those to the search as an OR query. i.e.:
Unfortunately, no. I have a set of denormalized data I would like to cache in redis and I would really like to be able to query it directly without having to set it up myself, as that kind of defeats the purpose of putting it there.
Well a full-text search is probably not the best way to achieve this, but suppose i have a list of names, and I want to do a query on a name that starts with or contains "Foo", without having to add "Foobar", "Foobaz", and "Foogle" to the suggestions for Foo, because I could search for "Foob" or "Foog" as well and I'd have to add those names as suggestions for Foob and Foog.
@RupertAvery Oh, in that case I might be able to help you after all! :)
I've also written a module called Secondary that allows you to do just that, with an SQL like syntax. You can use it on HASH keys or directly as a data type. Basically you can do:
IDX.FROM users_name WHERE "name LIKE 'foo%'" HGETALL $
And you can create indexes on multiple fields, etc.
@dvirsky, do you have a plan to add in RediSearch something like that:
SELECT*FROM table WHERE Column LIKE'%foo%';
SELECT*FROM table WHERE Contains(Column, "foo");
SELECT*FROM table WHERE Column CONTAINING "foo";
SCAN 0 MATCH *foo*
... etc.
For example, I need to find all words containing foo:
hi. at the moment we only support prefix queries. you can pre-split your terms if you want any suffix. indexing all suffixes of any term with the current data structure would be very costly.
Activity
dvirsky commentedon Feb 20, 2017
Currently - not directly, although it might change soon.
But you can do it in conjunction with the auto-suggestion API. What you can do is build a dictionary with
FT.SUGADD, and get prefix suggestions withFT.SUGGET, and pass those to the search as an OR query. i.e.:and in your code (writing python/pseudo code here):
But I intend to change the main index dictionary into a prefix tree, which will allow doing this automatically as you describe.
Will the above method do for now? You can of course implement it in Lua to make things atomic.
RupertAvery commentedon Feb 20, 2017
Unfortunately, no. I have a set of denormalized data I would like to cache in redis and I would really like to be able to query it directly without having to set it up myself, as that kind of defeats the purpose of putting it there.
dvirsky commentedon Feb 20, 2017
Can you explain further?
RupertAvery commentedon Feb 20, 2017
Well a full-text search is probably not the best way to achieve this, but suppose i have a list of names, and I want to do a query on a name that starts with or contains "Foo", without having to add "Foobar", "Foobaz", and "Foogle" to the suggestions for Foo, because I could search for "Foob" or "Foog" as well and I'd have to add those names as suggestions for Foob and Foog.
dvirsky commentedon Feb 20, 2017
@RupertAvery Oh, in that case I might be able to help you after all! :)
I've also written a module called
Secondarythat allows you to do just that, with an SQL like syntax. You can use it on HASH keys or directly as a data type. Basically you can do:And you can create indexes on multiple fields, etc.
Have a look: https://github.com/RedisLabsModules/secondary
RupertAvery commentedon Feb 20, 2017
I'll take a look at it, thanks!
dvirsky commentedon Feb 22, 2017
@RupertAvery did you look at the other module? have you tried it?
runningmaster commentedon Sep 13, 2017
@dvirsky, do you have a plan to add in
RediSearchsomething like that:For example, I need to find all words containing
foo:runningmaster commentedon Sep 13, 2017
To be more precise, I need something similar
Simple phrase query - hello AND worldbut with "containing" feature
dvirsky commentedon Sep 15, 2017
hi. at the moment we only support prefix queries. you can pre-split your terms if you want any suffix. indexing all suffixes of any term with the current data structure would be very costly.
Merge pull request RediSearch#27 from RediSearch/fix.paging
Replace C++ POC with Rust POC (#66)
refactor FullTermDocument* into term::Document term::Metadata term::b…
Merge pull request RediSearch#27 from RedisLabsModules/vecsim_query_r…