It looks like you are trying to use Lucene as a database, a document
database to be specific, and it actually isn't really supported out of the
box

Take a look at MongoDB, CouchDB or RavenDB.

On Thu, May 3, 2012 at 10:56 AM, Mike Aubury <m...@aubit.com> wrote:

> I'm writing some code at the minute and I have two main issues
> outstanding..
>
> 1) I want to aggregate data based on a user defined query - this means
> searching through an index when I have a new record to see if a record
> already exists
>     If it does - I want to update the totals in there with some new value.
>     If it does not exist - I want to create a new document containing my
> totals to store in a secondary index - but only have the fields that are
> used in the query..
>     So - is there any way to traverse the Query to find out what fields
> are used - so I can create a new document which only contains
>     those fields ?
>
> 2) When I pull the data back at the end - I want to be able to order the
> data by these totals - based on some query.
>     So - for example - I might aggregate all the sales by salesman and
> area, then select from that index for a particular area and have it ordered
> by the total sales.
>     If it makes it any clearer - in SQL it would be something like -
> select salesman, area, sum(sales)  GROUP BY 1,2 ORDER BY 3 desc
>     (obviously - I'm not doing salesmen and sales - if I was I'd probably
> use a relational database - but you get the idea)
>
> Any ideas on how to solve these two issues?
>
>
> Many thanks in advance
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> CLucene-developers mailing list
> CLucene-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/clucene-developers
>
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
CLucene-developers mailing list
CLucene-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/clucene-developers

Reply via email to