Closed xxzhang0927 closed 1 month ago
Don't need to delete and rebuild the index every time before performing a full-text search.
Fix your script to build index once and search multi times. For example,
if name == 'main':
add_index()
query_full_text()
query_full_text()
query_full_text()
The script doesn't delete index at the end. So another script can search directly without building index again:
if name == 'main':
query_full_text()
query_full_text()
query_full_text()
Why do I comment add_index and then execute it after restarting, the result is empty?How do I create a persistent index
Create index per the spec, do nothing if it already exist:
res = table.create_index(
"my_index",
[
infinity.index.IndexInfo("content", infinity.index.IndexType.FullText, [infinity.index.InitParameter("ANALYZER", "chinese")]),
],
infinity.common.ConflictType.Ignore,
)
or not
Can you show the full baitong_query.py ?
I also have the same problem.
I also have the same problem.
You can search after creating an index. After restart the server or reconnect infinity instance, you don't need to create the index any more.
Would you please provide your python scripts, to help me understand your problem?
thanks,is had post a new issue
Replaced with #1691
Fixed by #1698
Is there an existing issue for the same bug?
Version or Commit ID
v0.3.0
Other environment information
No response
Actual behavior and How to reproduce it
def add_index(): table.drop_index("my_index")
索引是现场创建的
def query_index(): res = table.show_index("my_index") print(res)
def query_full_text():
question = "间接服务角色"
if name == 'main': add_index() query_full_text()
If I don't use add_index() The result is empty
Expected behavior
No response
Additional information
No response