Can CLucene do a “search within search”, so that the second search is constrained by the results of the first query?
Yes. There are two primary options: • Use `QueryFilter` with the previous query as the filter. (you can search the Java Lucene mailing list archives for `QueryFilter` and Doug Cutting’s recommendations against using it for this purpose) • Combine the previous query with the current query using `BooleanQuery`, using the previous query as required. The `BooleanQuery` approach is the recommended one.
Related Questions
- Does saving a query in Self Service save a snapshot of the results or just the parameters selected for the search?
- Can CLucene do a "search within search", so that the second search is constrained by the results of the first query?
- Can Lucene do a "search within search", so that the second search is constrained by the results of the first query?