Redisearch client numeric

22 views
Skip to first unread message

Muhammad Risky Negoro Putro

unread,
Apr 21, 2020, 11:24:52 PM4/21/20
to RediSearch Discussion Forum
I have a condition, searching index by the filtered folder_article_id which numeric value,

whenever I upset the data, i want to get the data, set the updated, delete existing data, and reindex using IndexOption replace again.
when I add the index, it returns.
>> FT.SEARCH folder_article "@folder_article_id:[210 210]"
[ 1, "folder_article:210", [ "folder_article_id", "210", "is_deleted", "false", "reading_time", "2.6", "folder_article_name", "nama 321", "article_image_url", "article/2e5fc5eef7788804739f8dd51bdc6e2b.jpeg", "category_name", "test category", "created_at", "2020-04-22 10:21:50", "updated_at", "2020-04-22 10:21:50", "folder_article_status", "false", "article_id", "72", "category_id", "1", "folder_id", "102", "folder_article_uuid", "bqfrgjjipt30l7uqq8fg", "is_bookmarked", "true", "description", "test ajaa lemonilo", "user_id", "1", "env", "local" ]
]

then I try to search again
>> FT.SEARCH folder_article "@folder_article_id:[210 210]"
[ 0 ]

can you help me?

thank you

Muhammad Risky Negoro Putro

unread,
Apr 21, 2020, 11:27:05 PM4/21/20
to RediSearch Discussion Forum
I tried the following,
a.) setup replace partial, but the numeric also return 0
b.) upset, delete manually, set and reindex using index again.

but the behaviour search numeric always return unexpected like explained above.

Muhammad Risky Negoro Putro

unread,
Apr 21, 2020, 11:46:49 PM4/21/20
to RediSearch Discussion Forum
here is the schema

ft.info folder_article
[ "index_name", "folder_article", "index_options", [], "fields", [ [ "folder_id", "type", "NUMERIC" ], [ "folder_article_uuid", "type", "TEXT", "WEIGHT", "1" ], [ "folder_article_id", "type", "NUMERIC", "SORTABLE" ], [ "folder_article_status", "type", "TEXT", "WEIGHT", "1" ], [ "article_id", "type", "NUMERIC" ], [ "article_image_url", "type", "TEXT", "WEIGHT", "1" ], [ "folder_article_name", "type", "TEXT", "WEIGHT", "1" ], [ "reading_time", "type", "TEXT", "WEIGHT", "1" ], [ "category_name", "type", "TEXT", "WEIGHT", "1" ], [ "category_id", "type", "NUMERIC" ], [ "description", "type", "TEXT", "WEIGHT", "1" ], [ "user_id", "type", "NUMERIC" ], [ "is_bookmarked", "type", "TEXT", "WEIGHT", "1" ], [ "is_deleted", "type", "TEXT", "WEIGHT", "1" ], [ "created_at", "type", "TEXT", "WEIGHT", "1", "SORTABLE", "NOSTEM" ], [ "updated_at", "type", "TEXT", "WEIGHT", "1", "SORTABLE", "NOSTEM" ], [ "testing_id", "type", "NUMERIC" ] ], "num_docs", "77", "max_doc_id", "274", "num_terms", "325", "num_records", "1.8446744073709552e+19", "inverted_sz_mb", "0.0055780410766601562", "total_inverted_index_blocks", "1.8446744073709539e+19", "offset_vectors_sz_mb", "0.0075225830078125", "doc_table_size_mb", "0.025979995727539062", "sortable_values_size_mb", "0.028084754943847656", "key_table_size_mb", "0.0019807815551757812", "records_per_doc_avg", "2.3956810485337082e+17", "bytes_per_record_avg", "3.1707492534338577e-16", "offsets_per_term_avg", "4.2760933682828295e-16", "offset_bits_per_record_avg", "8", "gc_stats", [ "bytes_collected", "32930", "total_ms_run", "738773", "total_cycles", "57875", "avarage_cycle_time_ms", "12.764976241900648", "last_run_time_ms", "13", "gc_numeric_trees_missed", "0", "gc_blocks_denied", "0" ], "cursor_stats", [ "global_idle", 0, "global_total", 0, "index_capacity", 128, "index_total", 0 ] ]


On Wednesday, April 22, 2020 at 10:24:52 AM UTC+7, Muhammad Risky Negoro Putro wrote:

Ariel Shtul

unread,
Apr 23, 2020, 4:21:54 AM4/23/20
to RediSearch Discussion Forum
Hello Muhammad,
What version of RediSearch are you using?
It might be related to Issue #1085 that has been fixed a few months ago.
Regards,
Ariel
Reply all
Reply to author
Forward
0 new messages