On Wed, 2005-03-09 at 18:29 +0100, Nicolas Maisonneuve wrote: > I would like use a index with structured search field. > > - flat index (lucene type) > searchfield1 > searchfield2 > searchffield3 > ... > -structured index > search1 > search2 > search4 > search3 > search5 > > to allow simple extensions of some search features: > - the query TermQuery("search2", "coco" ) search in search2 and > search4 fields, > - The score depend of the depth where the word is found : A document > where "coco" is found in search4 field has a score lower than a > document with "coco" found in search2 > > How {do with,hack} lucene to integrated easily this notion of > structured field ? (no fuzzy methods allow because of the > performance) ?
If you know the structure of the index ahead of time and the weights you want to place on the different levels I'd do a query expansion. i.e. search2:coco would become search2:coco^4 OR search4:coco but actually creating the query objects rather than generating the string to be parsed by the QueryParser. -- Miles Barr <[EMAIL PROTECTED]> Runtime Collective Ltd. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]