Clarify AppEngine Search API Use

I started trying to use the new search API, the demo is running smoothly, however there are some points that I am still confused about being an outsider in the search world.

First of all, how to create a document. Obviously, you cannot hardcode each line in the document, but what else can I do. Say, if I have a custom class (I use Java, but I think Python doesn't matter here), and I would add user information to the document and be able to do a full-text search on the address field.

class User {
   String username;
   String password;
   String address;
}

In my data warehouse, I have this object with 10,000 instances, and if I need to create this document, I have to

Step 1: retrieve the instance of 10000 from the data warehouse

Step 2: Iterate through each user object and create 10,000 documents

Step 3: add all 10,000 documents to the index, and then I can search

Please correct me if the above three steps that I spoke about are incorrect.

If this is the case, does it make it that every time a new user is registered, we need to create a new document and add it to the index?

+5
source share
1 answer

Unfortunately, I will not manage much. I learned something.

  • During the first implementation, I also had to create a lot of documents (as you described). But he continued to work to the extreme exceptions. So I ended up upp using the task queue to create documents for all of my old records.

  • datastore. , . .

, search_document_id, doc_id ( doc_id ). , .

, .

+6

All Articles