Closed aaad closed 3 years ago
Hi @aaad, the issue is that you're missing a comma in your tuple, i.e. ('title')
vs ('title',)
. Python does not consider brackets a tuple unless they contain a comma, so it evaluates it as the string title
. The solution is to use either fields=('title',)
or fields=['title']
.
Hope that helps.
Thank you for this nice project, this really helps me.
I have the following problem: The index creation
idx = lunr(...)
throws the following exception when only specifying one field (fields=('title')
).If i specify two fields as field parameter (
fields=('title', 'title')
) then the code works.The problem can be reproduced by using this code: