Def search (search_str) :
Title_list=[]
Print 'here'
Ix=open_dir (" E: \ \ python_idx ")
A searcher=ix. A searcher ()
Print search_str, type (search_str)
results=a searcher. Find (" content ", search_str)
For hit in the results:
Print hit [' titel]
Print hit. Score
Print hit. Highlights (" content ", top=10)
Title_list. Append (hit [' titel '])
# print 'tt, title_list
Return title_list
Search (" enable ")
CodePudding user response:
Please answer, thank you!CodePudding user response:
Results=a searcher. Find (" content ", search_str)Find it only returns a value