hi, I believe the issue may be with your index names, specifically the underscores. Can you try defining them without the underscores, e.g. SERVICE_INDEX = "SERVICE_INDEX" SERVICE_LOCATION_INDEX = "SERVICE_LOCATION_INDEX"
and let me know if that works for you in production? -Amy On 8 September 2012 05:00, FastGeert <[email protected]> wrote: > Hi, > > this is the code I wrote: > > from google.appengine.api import search > SERVICE_INDEX = "__SERVICE_INDEX__" > SERVICE_LOCATION_INDEX = "__SERVICE_LOCATION_INDEX__" > .... > svc_index = search.Index(name=SERVICE_INDEX) > loc_index = search.Index(name=SERVICE_LOCATION_INDEX) > # cleanup any previous index entry > email = service.email() > svc_index.remove([email]) > cursor = search.Cursor() > while True: > query = search.Query(query_string="service:%s" % email, > options=search.QueryOptions(cursor=cursor, limit=10)) > search_result = loc_index.search(query) > loc_index.remove([r.doc_id for r in search_result.results]) > if search_result.number_found != 10: > break > cursor = search_result.cursor > # re-add if necessary > sc, locs = get_search_config(service) > if not sc.enabled: > return > svc_index.add(search.Document(doc_id=email, > fields=[search.TextField(name='service', value=email), > search.TextField(name='name', value=profile.name), > search.TextField(name='description', > value=profile.description), > search.TextField(name='keywords', value=sc.keywords)])) > > > > On Friday, September 7, 2012 7:31:10 PM UTC+2, Christina Ilvento wrote: > >> Hi, >> You don't need any special permissions to start using the experimental >> Search API. Could you provide your app-id or sample code? >> >> >> Thanks, >> Christina >> >> On Fri, Sep 7, 2012 at 8:50 AM, Ujjal <[email protected]> wrote: >> >>> Can u give some more details... Prob samle code that i can test to see? >>> >>> >>> On Sep 7, 2012 9:12 PM, "FastGeert" <[email protected]> wrote: >>> > >>> > Hi, >>> > >>> > today I started using the Text Search API to create a search >>> functionality in my app. >>> > >>> > While everything works just fine on the dev server, whatever api call >>> to the Text Search API results in an InvalidRequest exception on my >>> production app. >>> > remove ===> fails >>> > search ===> fails >>> > add ===> fails >>> > >>> > Do I need to perform a special action to use the Text Search API in >>> production or am I missing something else ? >>> > >>> > Regards, Geert. >>> > >>> > -- >>> > You received this message because you are subscribed to the Google >>> Groups "Google App Engine" group. >>> > To view this discussion on the web visit https://groups.google.com/d/* >>> *msg/google-appengine/-/**HyL1V1jn9dsJ<https://groups.google.com/d/msg/google-appengine/-/HyL1V1jn9dsJ> >>> . >>> > To post to this group, send email to google-a...@googlegroups.**com. >>> > To unsubscribe from this group, send email to google-appengi...@** >>> googlegroups.com. >>> >>> > For more options, visit this group at http://groups.google.com/** >>> group/google-appengine?hl=en<http://groups.google.com/group/google-appengine?hl=en> >>> . >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Google App Engine" group. >>> To post to this group, send email to google-a...@googlegroups.**com. >>> To unsubscribe from this group, send email to google-appengi...@** >>> googlegroups.com. >>> >>> For more options, visit this group at http://groups.google.com/** >>> group/google-appengine?hl=en<http://groups.google.com/group/google-appengine?hl=en> >>> . >>> >> >> >> >> -- > You received this message because you are subscribed to the Google Groups > "Google App Engine" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/google-appengine/-/8byLQD7kxUcJ. > > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/google-appengine?hl=en. > -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
