I suggest you to store date value as an string value and to search over
the string value. For example if user selects a date 2010-10-20, your
code should translate it into a string value
"20101020" before it saves it into the database. After this value is
stored as a string, you can use it in the queries.
For example you could define your search index as follow:
private String invoiceDateIndex;
private List<String> invoiceItemIndex;
Query searchQuery = new Query("InvoiceItemIndex");
searchQuery.addFilter("invoiceDateIndex", Query.FilterOperator.EQUAL,
requestedInvoiceDate);
searchQuery.addFilter("invoiceItemIndex", Query.FilterOperator.EQUAL,
requestedItemValue);
Hope that this will help you find out how to query over all items.
Regards,
Miroslav
On 07/11/2010 01:58 PM, Parvez wrote:
I want retrieve invoice numbers depending upon items e.g.
InvoiceNo Item InvoiceDate
10 item_a
11 item_a
11 item_b
11 item_z
12 item_a
12 item_c
12 item_x
13 item_a
13 item_x
User can search on item(s) and can also include period (invoice date)
as part of search.
Initially, I tried using list property for Item, it worked but then it
failed once more than 6, 7 items included in query along with date
i.e. "Too many indexed properties for entity.." [:-) then I found out
that I can not delete index in java, using java sdk 1.3.5, it works
locally, but does not work when application uploaded]
In above example if user query for "item_a" and "item_b" then I
should only get invoice number 11.
Any suggestion how can I achieve this?
Thanks.
--
You received this message because you are subscribed to the Google Groups "Google
App Engine for Java" group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/google-appengine-java?hl=en.