2

Hi I am implementing search functionality using Full Text Search(document api) of google app engine

following is the procedure how i have saved data in my documents

For instance if user enters "hello world" then i save "hello world h he hel hell hello w wo wor worl world" in my documents as shown in this question (Google App Engine (python) : Search API : String Search)

it is working fine WRT following examples

if I have a string in db "this is a amazing and beautiful house" and now if I will search

  • "this" ---> this will work
  • "this is a amazing" ---> this will work
  • "beautiful house" ---> this will work

but if i will search "amazing house" this will not work

I want it to work this way too

Can you guys suggest some idea how to do this

Saim Abdullah
  • 174
  • 14

1 Answers1

0

the problem was my method of making query for search, there are specific ways how you can make query in documents for example

\"search key words\" ---> this will look for the exact match in documents (in my case I was making query like this which was wrong)

"search key words" ---> Retrieves documents that contains at least one occurrence of the words irrespective if their order

for more details kindly view this https://cloud.google.com/appengine/docs/standard/python/search/query_strings#Python_Queries_on_text_and_HTML_fields

Saim Abdullah
  • 174
  • 14