To create a Document in appengine, I can do this
Document document = Document.newBuilder().setId("document id")
.setLocale(Locale.UK)
.addField(Field.newBuilder()
.setName("subject")
.setText("going for dinner"))
.addField(Field.newBuilder()
.setName("body")
.setHTML("<html>I found a restaurant.</html>"))
.addField(Field.newBuilder()
.setName("signature")
.setText("ten post jest przeznaczony dla odbiorcy")
.setLocale(new Locale("pl")))
.addField(Field.newBuilder()
.setName("tag")
.setText("food"))
.addField(Field.newBuilder()
.setName("tag")
.setText("friend"))
.build();
May I set one of the addField
values to a Document?
I need the following setup
Book author price review review review // many, many Reviews
Review user rating comment
How might I create this compound document, as it were, for the app-engine Search API?
You can't have compound documents like that in a single app engine search index. However, there are other things you can do:
It really depends on what your search usage patterns are going to be.