Results 1 to 2 of 2
  1. #1
    mdpete4 is offline Member
    Join Date
    Nov 2013
    Rep Power

    Default Compute the sum of grouped field values


    I'm trying to produce time series/trend data to feed a trend chart using a lucene index. The index has a number of numeric fields which I would like to sum across a group. I've been unable to find any reference on how to accomplish this. I'm under a time crunch so I thought I'd try here.


    Field1 = account
    Field2 = salesAmount

    I want to group the docs by Field1 and sum the values of Field2 across the group. Is this even possible?


  2. #2
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Rep Power

    Default Re: Compute the sum of grouped field values

    You misunderstand - Lucene is not a database.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

Similar Threads

  1. How to access derived class field values?
    By ehsansh in forum New To Java
    Replies: 9
    Last Post: 10-02-2013, 03:04 PM
  2. Checking duplicates values in key field
    By drimades in forum JDBC
    Replies: 1
    Last Post: 03-12-2012, 11:59 AM
  3. How to get Integer values from Text Field
    By aks_saxena in forum AWT / Swing
    Replies: 3
    Last Post: 04-09-2011, 02:00 PM
  4. resting text field values on jsp page to null......
    By Sachin. in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 09-27-2009, 03:24 AM
  5. Using Scanner to compute an average of the values
    By Java Tip in forum java.lang
    Replies: 0
    Last Post: 04-17-2008, 08:36 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts