Hi GArchitect,

There's no problem with having both indexes. But the index you listed
isn't compatible with the query you provided.

-Nick Johnson

On Tue, Jul 14, 2009 at 10:12 AM, GArchitect<[email protected]> wrote:
>
> Hi Nick,
>
> The id field was from the examples.  Anyway, was trying to remove the
> old index but without success (no remove in Java SDK, and no success
> with the Python SDK either). Right now I have both the old and the new
> index running on the server (the new one is just the old one with id
> removed) so perhaps there may be conflicts.
>
> Or should I just create a totally new class name with the right fields
> and build the index on those new classes for now until the Java vacuum
> index is ready?
>
> Best,
>
> Tommy
>
> On 7月7日, 下午9時54分, "Nick Johnson (Google)" <[email protected]>
> wrote:
>> Hi GArchitect,
>>
>> The index you list isn't suitable for that query - the index includes
>> the 'id' field at the start, but you don't appear to be filtering or
>> sorting on it.
>>
>> -Nick Johnson
>>
>>
>>
>> On Mon, Jul 6, 2009 at 4:28 AM, GArchitect<[email protected]> wrote:
>>
>> > Hi, I got the following exception in a method executing a query:
>>
>> > C 07-05 07:23PM 42.069
>> > Uncaught exception from servlet
>> > com.google.appengine.api.datastore.DatastoreNeedIndexException: no
>> > matching index found.
>> >        at
>> > com.google.appengine.api.datastore.DatastoreApiHelper.translateError
>> > (DatastoreApiHelper.java:34)
>> >        at 
>> > com.google.appengine.api.datastore.DatastoreApiHelper.makeSyncCall
>> > (DatastoreApiHelper.java:55)
>> >        at com.google.appengine.api.datastore.DatastoreServiceImpl
>> > $PreparedQueryImpl.runQuery(DatastoreServiceImpl.java:310)
>> >        at com.google.appengine.api.datastore.DatastoreServiceImpl
>> > $PreparedQueryImpl.access$100(DatastoreServiceImpl.java:240)
>> >        at com.google.appengine.api.datastore.DatastoreServiceImpl
>> > $PreparedQueryImpl$1.iterator(DatastoreServiceImpl.java:269)
>> >        at
>> > org.datanucleus.store.appengine.query.RuntimeExceptionWrappingIterable.iterator
>> > (RuntimeExceptionWrappingIterable.java:42)
>> >        at org.datanucleus.store.appengine.query.StreamingQueryResult.<init>
>> > (StreamingQueryResult.java:72)
>> >        at
>> > org.datanucleus.store.appengine.query.DatastoreQuery.fulfillEntityQuery
>> > (DatastoreQuery.java:253)
>> >        at 
>> > org.datanucleus.store.appengine.query.DatastoreQuery.performExecute
>> > (DatastoreQuery.java:220)
>> >        at org.datanucleus.store.appengine.query.JDOQLQuery.performExecute
>> > (JDOQLQuery.java:85)
>> >        at org.datanucleus.store.appengine.query.JDOQLQuery.performExecute
>> > (JDOQLQuery.java:31)
>> >        at org.datanucleus.store.query.Query.executeQuery(Query.java:1466)
>> >        at org.datanucleus.store.query.Query.executeWithArray(Query.java:
>> > 1340)
>> >        at org.datanucleus.jdo.JDOQuery.execute(JDOQuery.java:240)
>> >        at
>> > com.solveware.gwt.sample.stockwatcher.server.HistoricalQuote.getAllQuotesOnSymbol
>> > (HistoricalQuote.java:130)
>> > ...
>>
>> > However, according to the admin console, the required index is up and
>> > running
>>
>> > HistoricalQuote
>> > id ▲ , symbol ▲ , date ▲  Serving
>>
>> > And the code for executing the query:
>>
>> >          public static List<HistoricalQuote> getAllQuotesOnSymbol(String
>> > symbol) {
>> >                    PersistenceManager pm = 
>> > PMF.get().getPersistenceManager();
>> >                    Query query = pm.newQuery(HistoricalQuote.class);
>> >                    query.setFilter("symbol == userSubmittedSymbol");
>> >                    query.setOrdering("date ASC");
>> >                    query.declareParameters("String userSubmittedSymbol");
>> >                    List<HistoricalQuote> entries = (List<HistoricalQuote>)
>> > query.execute(symbol);
>> >                    return entries;
>> >          }
>>
>> > So I wonder if anyone can shed some light on why this is happening?
>> > Is it a problem on the GAE side that is waiting to be fixed?
>>
>> > Any help is appreciated.  Thanks.
>>
>> > Best,
>>
>> > Tommy
>>
>> --
>> Nick Johnson, App Engine Developer Programs Engineer
>> Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration
>> Number: 368047
> >
>



-- 
Nick Johnson, App Engine Developer Programs Engineer
Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration
Number: 368047

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to