RediSearch / redisearch-py

RediSearch python client

Home Page:https://redisearch.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to get all data from docs

pnthai88 opened this issue · comments

client.info()
query = Query("this is keyword").paging(0, 10)
q = client.search(query)

sample loop for each itm:

for itm in q.docs:
    	print(itm)

result

Document {'owner': 'srva', 'add_time': '2021-10-18 20:27:10.344281', 'TTL': '$0.07'}
Document {'owner': 'srva', 'add_time': '2021-10-18 20:27:10.342266', 'TTL': '$0.08'}

if I use
print(itm.add_time) I can get 2021-10-18 20:27:10.344281

How do I get all of information ?

Which information is missing here?

Document {'owner': 'srva', 'add_time': '2021-10-18 20:27:10.344281', 'TTL': '$0.07'}

Hello @gkorland ,
I'm trying to loop on each Document item to get its key and value. How can I do it ?

I know the the column's name. But it's dynamic from excel

Cols = ['owner','add_time','TTL']

When i try:

for col in Cols:
  print ( itm.col )

(This type of loop will not work)

Beautiful, it's working. Thank you!