Questions tagged [gae-search]

The Search API allows your application to perform Google-like searches over structured data. You can search across several different types of data (plain text, HTML, atom, numbers, dates, and geographic points). Searches return a sorted list of matching text, and you can customize the sorting and presentation of results.

The Google App Engine Search API provides a simple model for indexing and searching data, and displaying the results. Search can query any data, as long as that data is described by a document. You structure data in documents using a number of Field classes to describe different type of text the document contains (plain text, HTML, atom, numbers, dates, and geographic points).

After constructing the document, you can use methods of the Index class to add, remove, or list documents in an index, and also to search an index with a query. The API provides a comprehensive query language that supports numeric and text expressions. The API also allows you to specify query options, such as sort order for results, the number of results returned, and a starting cursor position or offset.

You can use field expressions and snippeted fields to control the presentation and content of search results, and you can use cursors to page through each set of results. Field expressions let you specify which fields to return. Snippeted fields in the QueryOptions class allow you to return an abbreviated snippet of a field instead of its full content.

Matching search results are returned to the application in a SearchResults object. This object includes the number of results found, the actual results returned, and an optional cursor object.

For further information see Google's Search API Documentation.

93 questions
0
votes
1 answer

Google App Engine: The API package 'search' or call 'IndexDocument()' was not found

Using Google App Engine's Search API, I am trying to index some document into a test index. I am using the code sample given on the Google App Engine official documentation. But when I try to run the snippet below. I get the following error when I…
apurva.nandan
  • 1,061
  • 1
  • 11
  • 19
0
votes
1 answer

What is the optimized way for queries on partial dates in GAE Text Search?

Need to get entities filtering by month instead of complete date values (E.g. Birthdays) using Google App Engine Text Search. On verifying GAE docs, I think it is not possible to query date fields by month directly. So in order to filter them by…
0
votes
0 answers

GAE Datastore search not working on local development instance (Java)

My local instance of Java Google App Engine seems to index search documents just fine, but started throwing an exception when running a search. Code snippet and exception included. TIA! Code for searching : QueryOptions options =…
0
votes
1 answer

Updating some Fields and Reindexing Google Search API Documents

I'm trying to use the Google Search API on my Android App and I have added the documents in the index. Now I'm retrieving the document by its ID and I want to update just some fields, not all of then. That I tried to do but with no success: //…
jluiz20
  • 199
  • 1
  • 2
  • 12
0
votes
1 answer

Does search API automatically create an index corresponding to model?

I recently created some search documents and added them to a custom search index using the following which generates an index per user for the model type. def _post_put_hook(self, future): document = self.create_search_document() index…
0
votes
0 answers

Google appengine search api sort by ndb value

I am having a list of products. I have added to the google appengine search API index with each product being each document. User can search for products. So far everything is good. Now I want the user to be able to sort by price of the product…
Sriram
  • 8,574
  • 4
  • 21
  • 30
0
votes
2 answers

Spatial Search Objectify, appengine

I want to use, objectify for spatial search. I have entities that have longitude and latitude associated with them. Latitude and longitude information is dynamic e.g. service providers (like electrician, carpenter) in a city. I want to implement a…
0
votes
0 answers

Search on google app engine

I am using google app engine search api for searching.I want to merge the results of multiple queries into one.How do I do that in python.
0
votes
1 answer

What is the sort order of returned results for search.get_indexes() in google app engine?

I am using the search.get_indexes() function as documented here, to get the list of search indexes that I have stored. From a few test cases, it seems that the returned list is sorted alphabetically on the Index name. Is it known or documented that…
Bot Cyborg
  • 63
  • 4
0
votes
2 answers

Should I use NDB or Search API for storing User model?

Suppose I have basic User model in ndb with following properties: ``` name = ndb.StringProperty(default='') username = ndb.StringProperty(required=True) email = ndb.StringProperty(default='') active = ndb.BooleanProperty(default=True) admin =…
0
votes
1 answer

Result limiting with GAE Search API

I have this search code that is quite bugging me, if(webSafeCursor != null && !webSafeCursor.isEmpty()){ Cursor cursor = Cursor.newBuilder().build(webSafeCursor); QueryOptions options = QueryOptions.newBuilder() …
quarks
  • 33,478
  • 73
  • 290
  • 513
0
votes
0 answers

Google App engine query - consistency or some other issue?

I wonder if my case is consistency issue... I have an entity class Player, which has a field lastAttackDate. I set lastAttackDate = sysdate in a transaction, then I commit that transaction, and then I query for players with lastAttackDate < sysdate…
0
votes
2 answers

Search API: How come "Ondřej" matches "ondrej"? I need to mimic that in browser

UPDATE: In the end I used Java6 Normalizer to find out which characters are extensions of a-zA-Z. So now all weird characters get translated into those 50 ASCII letters. No noticable slowing down when typing/autocompleting. Using what algorithm…
0
votes
1 answer

How can I include the doc_id field in results returned by Google App Engine search?

I have a set of fields indexed by GAE search and can get results thus: options = search.QueryOptions(returned_fields=['ID', 'firstname', 'lastname']} query = search.Query('firstname:moe') This gets me results returned and I can access data in the…
Carl
  • 2,896
  • 2
  • 32
  • 50
0
votes
1 answer

Does GAE-Search document field-name length affect the data size (and hence cost)

Does GAE-Search keep the field name with each document or at the top level? If it keeps (and transmits) field names with each document, I will need to minimize the field name length to reduce storage and network cost, else I can keep the names more…
Ashish Awasthi
  • 1,302
  • 11
  • 23