lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henrik Hjalmarsson" <>
Subject Sv: Re: Facets
Date Thu, 05 Nov 2009 15:37:26 GMT
So basicly there is no effective way of doing this?
The only solution I've come up with is

Pseudo code:

for( every index )
    create term(index, "*")
    create wildcard query with term
    rewrite query to primitive query
    extract terms from primive query
    for( each term extracted )
        create query with term and query string from request

for( each query created above )
    search with query asking for 1 result.
    check total number of hits for query

print result

Something like that. Is that a totaly idiotic way of doing it?

>>> Chris Lu  09-11-04 02:51 >>>
If the query is a very selective one, you can go through the XML 
document and do the counting.

If the query is not so selective, which is usually the case, and the 
number of matches are large, basically all the values need to be loaded 
into memory, or solid state disk, to do a fast counting.

Chris Lu
Instant Scalable Full-Text Search On Any Database/Application
Lucene Database Search in 3 minutes:
DBSight customer, a shopping comparison site, (anonymous per request) got 2.6 Million Euro

Henrik Hjalmarsson wrote:
> Hello
> I am trying to develop an API for a search application that is using Lucene 2.4.1
> The search application is maintained by RAA (swedish goverment organization that keeps
track of historical and cultural data).
> I have gotten a demand for an API method that returns an XML response, listing all the
indexes in this application and the number of unique values these indexes can have, filtered
by a query that is recieved in the method request.
> The application contains a large amount of indexes and some indexes contains a very large
amount of unique values. Is there some way to achive this in an effective way?
> With regards Henrik

To unsubscribe, e-mail:
For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message