fdb-record-layer
fdb-record-layer copied to clipboard
Lucene should document how to index primary key components
The primary key turns into a stored field, but as a byte array. Also, if the primary key has multiple components there is still only one field in the document. If search needs to match a primary key field (perhaps only part of the whole key), that field needs to be added to the index definition separately.
This is somewhat different from regular indexes, where adding the primary key explicitly only affects the ordering of keys. For example, given a primary key of big_group, sub_key
, and a VALUE
index on a_field
, I can do queries that equality constrain both a_field
and big_group
.
I think this is worth a comment.