Permalink
Browse files

Also lowercase NOT

  • Loading branch information...
1 parent def8680 commit 76355f36f2b8bfbe194cd5d0ab88f6632f6313ce @turian committed Aug 24, 2010
Showing with 1 addition and 0 deletions.
  1. +1 −0 retrieve-sentences.py
View
@@ -39,6 +39,7 @@ def retrieve(querytext, searcher, queryparser, maxresults=1000):
# querytext = querytext.replace("OR AND", "or and")
querytext = querytext.replace("OR", "or")
querytext = querytext.replace("AND", "and")
+ querytext = querytext.replace("NOT", "not")
query = queryparser.parse(queryparser.escape(querytext))
# query = QueryParser(analyzer).parse("Find this sentence please")
hits = searcher.search(query, maxresults)

0 comments on commit 76355f3

Please sign in to comment.