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
FT.CREATE testidx SCHEMA num NUMERIC name TEXT
FT.ADD testidx doc1 1 FIELDS num 140 name test
FT.ADD testidx doc2 1 FIELDS num 1400 name test
FT.ADD testidx doc3 1 FIELDS num 1405 name test
Okay, it's not actually what happens. The problem is that all documents have the same score so the compare function was unstable. I've changed it a bit and it seems to be working better.
Excuse me, but seems that i have another kind of problem. Imagine i want to organize paging functionality with page-size = 4
create an index and add five documents to it:
FT.CREATE indexName SCHEMA status TEXT
FT.ADD indexName doc1 1 FIELDS status open
FT.ADD indexName doc2 1 FIELDS status open
FT.ADD indexName doc3 1 FIELDS status open
FT.ADD indexName doc4 1 FIELDS status open
FT.ADD indexName doc5 1 FIELDS status open
Then i want to get first page with 4 elements in it:
The semantics are LIMIT {offset} {num} with a zero based index, so the 4th element should be accessed with LIMIT 3 1. However, this is in fact a bug, you are right.
Activity
dvirsky commentedon Jun 6, 2017
This is unrelated to numeric indexes, but a bug in paging when there are less results than 10. Will be fixed, thanks for catching this.
dvirsky commentedon Jun 7, 2017
Okay, it's not actually what happens. The problem is that all documents have the same score so the compare function was unstable. I've changed it a bit and it seems to be working better.
If you want to sort by the numeric property, take a look at sortable properties and the SORTBY argument in the docs. http://redisearch.io/Sorting/
onexdrk commentedon Jun 7, 2017
Got it, thanks. Is it already in master?
dvirsky commentedon Jun 7, 2017
yes
onexdrk commentedon Jun 7, 2017
Excuse me, but seems that i have another kind of problem. Imagine i want to organize paging functionality with page-size = 4
create an index and add five documents to it:
Then i want to get first page with 4 elements in it:
response correct
Now i want go see last element:
Incorrect - must contains only
doc1.I think i can try fix it in backend and if it is last page - trim result and use just a tail, but it looks like a problem
dvirsky commentedon Jun 7, 2017
The semantics are
LIMIT {offset} {num}with a zero based index, so the 4th element should be accessed withLIMIT 3 1. However, this is in fact a bug, you are right.onexdrk commentedon Jun 7, 2017
Please, let me know if it will be fixed. May be open new issue about that?
dvirsky commentedon Jun 7, 2017
Yes, I prefer another issue if you don't mind.
onexdrk commentedon Jun 7, 2017
Yep, thanks, I'll create it
Replace C++ POC with Rust POC (#66)
refactor FullTermDocument* into term::Document term::Metadata term::b…
Iterator api (RediSearch#61)