Marvin Humphrey wrote on 8/30/11 4:59 PM:
> To support highlighting, at index-time we create an inverted representation
> for each field that has been marked as "highlightable", then serialize all the
> inverted fields together in one blob (called, for no particularly good reason,
> a "DocVector"). Effectively this is a miniature inverted-index containing a
> single document. The class which does the work is
> Lucy::Index::HighlightWriter, and the relevant segment files are named
> seg_NNN/highlight.ix and seg_NNN/highlight.dat.
I finally found time to try this, but I must be doing something wrong, because
despite setting all my fields to 'highlightable', no seg_NNN/highlight.* files
are getting created.
here's a snip from schema_1.json:
"fields" : {
"author" : {
"analyzer" : "1",
"highlightable" : "1",
"sortable" : "1",
"type" : "fulltext"
},
"dates" : {
"analyzer" : "1",
"highlightable" : "1",
"sortable" : "1",
"type" : "fulltext"
},
"orgs" : {
"analyzer" : "1",
"highlightable" : "1",
"sortable" : "1",
"type" : "fulltext"
},
and here's what my index dir looks like:
index.swish3]$ tree
.
|-- locks
|-- schema_1.json
|-- seg_1
| |-- cf.dat
| |-- cfmeta.json
| `-- segmeta.json
|-- snapshot_1.json
|-- swish.xml
`-- swish_last_start
2 directories, 7 files
--
Peter Karman . http://peknet.com/ . [email protected]