
larryl at emailplus
Nov 30, 2007, 6:47 PM
Views: 767
Permalink
|
|
Field-specific terms vs. query filter?
|
|
Hi - I'm working with an index that has a "category_id" field, and I need to filter search results based on specific categories which the user shouldn't be able to see. Right now I'm taking the user's original query and appending a lot of booleans with field-specific terms, e.g. a search for "foo" turns into something like "(foo) AND NOT (category_id:1) AND NOT (category_id:7) AND NOT ...". Is there any advantage to building up a Boolean query for just the category_id parts, and using that as a query filter instead? I won't necessarily be able to cache/reuse the query filter. Is there a better way in general to do this? Related question: Assuming the category_id field is indexed but not analyzed, is a field-specific term going to do an exact match? I.e. will "category_id:1" match just "1", or will it also match "10"? Thanks! Larry _______________________________________________ KinoSearch mailing list KinoSearch[at]rectangular.com http://www.rectangular.com/mailman/listinfo/kinosearch
|