Hi,

I have some confusion around indices (full-text and index). Is it fine to
have same index for all full-text and non-full-text (or exact) fields? or
does it affect the performance? Or to put it in a different way, at what
point do we separate indices?

For example:

I have a NodeEntity 'Product' with exact and full text indices. I have added
all the fields to the same index.

public class Product {
    @Indexed(indexName = "product-search", fulltext=true)
    String name;
    @Indexed(indexName = "product-search")
    int expectedAmount;
    @Indexed(indexName = "product-search", fulltext=true)
    String details;
    .....
}

I need to fire a compound query for fields name, details and expectedAmount.
    Index<Node> namedProductIndex =
graphDatabaseContext.getIndex(Product.class, "product-search");
    Iterable<Node>  nodes = namedProductIndex.query("(name:*book* OR
details:*book*) AND expectedAmount:700");

Therefore, I added all the fields name, details and expectedAmount keys in
the same index called 'product-search'.
name and details are full text but expectedAmount is not required to be full
text. Is it ok to add full-text and non-full-ltext fields to the same index?

Many Thanks,
Sambodhi
_______________________________________________
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to