Thanks...I realized it was in the documentation after digging a little further...oops. Although I do have a question. Given the model of a User with Items that have a string field "name", I mapped it like this:
Code:
mapping.entity(User.class).indexed().indexName("user-index").property("items", ElementType.FIELD).indexEmbedded();
mapping.entity(Item.class).indexed().indexName("item-index")
.property("name", ElementType.FIELD).field().index(Index.TOKENIZED).store(Store.YES)
.property("user", ElementType.FIELD).containedIn();
Which works great as a query on User like this:
Code:
items.name:SomeName
gives me all Users that have an Item with the name "SomeName". However, when I inspect the index via Luke, there are redundant fields. Both the "name" field and "items.name" field appear in the index (with the same number of terms, of course). I don't like this, because eventually I'll be indexing the item description which has a lot more terms and I don't want to have two sets like that. I want to keep the index as lean as possible. So, am I being redundant in my mapping or is this just the way things work? I should also point out that "items.id" shows up as a field in the index and I'll never need to use that. Any advice would be appreciated.
Regards,
Jeff