The only required parameter of the `search.Index 
<https://cloud.google.com/appengine/docs/python/search/indexclass>` 
function is `name` which is normally a string, so it's safe to assume that 
`config.STORE_INDEX_NAME` simply stores the name of the index where you 
will be performing your search so you could've had something like 
`search.Index(name='my_index')` instead. Note that if you haven't 
previously added anything to that index  - the search will not return 
anything.

It looks like you're following the "More Complex Search API Queries 
<https://cloud.google.com/appengine/training/fts_adv/lesson1>" tutorial 
which assumes you already have some basic familliarity with the Search API 
but if you don't, you should start with the "Search API Basics 
<https://cloud.google.com/appengine/training/fts_intro/lesson2>" tutorial 
first which will explain you how to index your data first and then query it.

Thanks,
Mihail.

On Tuesday, August 4, 2015 at 9:06:04 AM UTC+3, Sourabh Agrawal wrote:
>
> Hey, 
>
> i am new to gaepython, I have been trying to find nearby areas to a given 
> location.. I found search api could do this, what i couldn't figure out is 
> that* what will be config.STORE_INDEX_NAME*. When is used this exact code 
> it says "* NameError: name 'config' is not defined*"
>
>
> from google.appengine.api import search
>
> query = "distance(geopoint(35.2, 40.5), geopoint(35.2, 40.5)) < 100"
> index = search.Index(config.STORE_INDEX_NAME)
> search_results = index.search(query)
>
> Thanks in advance
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/e494b7e1-784e-46ac-87b8-16c25aa70aef%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to