incubator-blur-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dibyendu Bhattacharya <dibyendu.bhattach...@gmail.com>
Subject Re: Sorting in Apache Blur 0.2.2.
Date Thu, 19 Jun 2014 18:36:52 GMT
Thanks Aaron

Dibyendu


On Thu, Jun 19, 2014 at 10:15 PM, Aaron McCurry <amccurry@gmail.com> wrote:

> I have resolved the bug.
>
> https://issues.apache.org/jira/browse/BLUR-340
>
> Thanks for reporting it!
>
> Aaron
>
>
> On Tue, Jun 17, 2014 at 1:00 PM, Aaron McCurry <amccurry@gmail.com> wrote:
>
> > My testing shows that the sort is broken, I'm working on fixing it now.
> >
> > Aaron
> >
> >
> > On Tue, Jun 17, 2014 at 10:28 AM, Aaron McCurry <amccurry@gmail.com>
> > wrote:
> >
> >> On Tue, Jun 17, 2014 at 10:08 AM, Dibyendu Bhattacharya <
> >> dibyendu.bhattachary@gmail.com> wrote:
> >>
> >>> Hi,
> >>>
> >>> I think there are still issue in sorting. As I iterate over the
> >>> BlurResult
> >>> , I can see data are partially sorted. e.g. I have 3 shard server, and
> if
> >>> my search return say 100 records, I do not see all 100 are sorted, but
> >>> subset of those records are sorted. Is the sorting happening on shard
> >>> server level and thus three cluster of sorted results I am getting
> which
> >>> are basically sorted set from a given shard server ?
> >>>
> >>
> >> You could isolate where the problem lies (controller or shard server) by
> >> connecting your client to the shard server and seeing if the results are
> >> correct from there.  The shard server and controller server share the
> same
> >> api so you would just need to alter the connection string to reflect the
> >> shard server ( <node name>:40020 ).
> >>
> >> I am in the process of testing right now.  I will let you know what I
> >> find.
> >>
> >> Aaron
> >>
> >>
> >>>
> >>> Dib
> >>>
> >>>
> >>>
> >>> On Tue, Jun 17, 2014 at 6:48 PM, Aaron McCurry <amccurry@gmail.com>
> >>> wrote:
> >>>
> >>> > Ok, we need to provide a better error message.  Glad to hear that
> >>> things
> >>> > seem to be working.
> >>> >
> >>> > Aaron
> >>> >
> >>> >
> >>> > On Tue, Jun 17, 2014 at 2:43 AM, Dibyendu Bhattacharya <
> >>> > dibyendu.bhattachary@gmail.com> wrote:
> >>> >
> >>> > > Hi,
> >>> > >
> >>> > > When I set  "query.setRowQuery(false)"; then I do get the result
in
> >>> > sorted
> >>> > > order.. . Sorry I did not check the Row Query to false yesterday...
> >>> > >
> >>> > > As I see the documents, I think right now sorting is only supported
> >>> for
> >>> > > Record Query.. So we are fine now with setting the above boolean
> >>> flag.
> >>> > >
> >>> > >
> >>> > >
> >>> > > When Row Query is not set to false, then I got following
> exception..
> >>> > >
> >>> > > BlurException(message:Query [Query(query:*, rowQuery:true,
> >>> > scoreType:SUPER,
> >>> > > rowFilter:null, recordFilter:null)] in BlurQuery
> >>> > > [BlurQuery(query:Query(query:*, rowQuery:true, scoreType:SUPER,
> >>> > > rowFilter:null, recordFilter:null), facets:null,
> >>> > > selector:Selector(recordOnly:true, locationId:null, rowId:null,
> >>> > > recordId:null, columnFamiliesToFetch:[revel], columnsToFetch:null,
> >>> > > startRecord:0, maxRecordsToFetch:1000, highlightOptions:null,
> >>> > > orderOfFamiliesToFetch:null), useCacheIfPresent:true, start:0,
> >>> fetch:100,
> >>> > > minimumNumberOfResults:9223372036854775807,
> >>> > > maxQueryTime:9223372036854775807, uuid:null, userContext:null,
> >>> > > cacheResult:true, startTime:0, sortFields:[SortField(family:revel,
> >>> > > column:timestamp, reverse:true)], rowId:null)] cannot be a rowquery
> >>> when
> >>> > > sortfields are supplied., stackTraceStr:null, errorType:UNKNOWN)
> >>> > >         at
> >>> > >
> >>> > >
> >>> >
> >>>
> org.apache.blur.thrift.generated.Blur$query_result$query_resultStandardScheme.read(Blur.java:17790)
> >>> > >         at
> >>> > >
> >>> > >
> >>> >
> >>>
> org.apache.blur.thrift.generated.Blur$query_result$query_resultStandardScheme.read(Blur.java:1)
> >>> > >         at
> >>> > >
> >>>
> org.apache.blur.thrift.generated.Blur$query_result.read(Blur.java:17706)
> >>> > >         at
> >>> > >
> >>> > >
> >>> >
> >>>
> org.apache.blur.thirdparty.thrift_0_9_0.TServiceClient.receiveBase(TServiceClient.java:78)
> >>> > >         at
> >>> > >
> >>> org.apache.blur.thrift.generated.Blur$Client.recv_query(Blur.java:959)
> >>> > >         at
> >>> > >
> >>> > >
> >>> >
> >>>
> org.apache.blur.thrift.generated.SafeClientGen.recv_query(SafeClientGen.java:403)
> >>> > >         at
> >>> > > org.apache.blur.thrift.generated.Blur$Client.query(Blur.java:945)
> >>> > >         at
> >>> > >
> >>> > >
> >>> >
> >>>
> org.apache.blur.thrift.generated.SafeClientGen.query(SafeClientGen.java:221)
> >>> > >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> >>> Method)
> >>> > >         at
> >>> > >
> >>> > >
> >>> >
> >>>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> >>> > >         at
> >>> > >
> >>> > >
> >>> >
> >>>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> >>> > >         at java.lang.reflect.Method.invoke(Method.java:606)
> >>> > >         at
> >>> > >
> >>> > >
> >>> >
> >>>
> org.apache.blur.thrift.BlurClient$BlurClientInvocationHandler$1.call(BlurClient.java:60)
> >>> > >         at
> >>> > >
> >>> > >
> >>> >
> >>>
> org.apache.blur.thrift.BlurClient$BlurClientInvocationHandler$1.call(BlurClient.java:1)
> >>> > >         at
> >>> > >
> org.apache.blur.thrift.AbstractCommand.call(AbstractCommand.java:62)
> >>> > >         at
> >>> > >
> >>> > >
> >>> >
> >>>
> org.apache.blur.thrift.BlurClientManager.execute(BlurClientManager.java:192)
> >>> > >         at
> >>> > >
> >>> > >
> >>> >
> >>>
> org.apache.blur.thrift.BlurClient$BlurClientInvocationHandler.invoke(BlurClient.java:56)
> >>> > >         at com.sun.proxy.$Proxy0.query(Unknown Source)
> >>> > >         at
> >>> > >
> >>> >
> >>>
> com.pearson.blur.client.indexer.BlurQueryTest.main(BlurQueryTest.java:107)
> >>> > >
> >>> > >
> >>> > >
> >>> > >
> >>> > >
> >>> > > On Mon, Jun 16, 2014 at 10:30 PM, Aaron McCurry <
> amccurry@gmail.com>
> >>> > > wrote:
> >>> > >
> >>> > > > Ok that sounds like a bug.  Thanks for letting us know, I
will
> >>> take a
> >>> > > look
> >>> > > > this afternoon and try to track it down for you.
> >>> > > >
> >>> > > > Thanks!
> >>> > > >
> >>> > > > Aaron
> >>> > > >
> >>> > > >
> >>> > > > On Mon, Jun 16, 2014 at 12:58 PM, Dibyendu Bhattacharya <
> >>> > > > dibyendu.bhattachary@gmail.com> wrote:
> >>> > > >
> >>> > > > > Yes, I get all records matched the search if I comment
the
> >>> sorting ,
> >>> > > i.e.
> >>> > > > > if I comment below line, I got the results.
> >>> > > > >
> >>> > > > > blurQuery.addToSortFields(new SortField("family", "timestamp",
> >>> > true));
> >>> > > > >
> >>> > > > >
> >>> > > > >
> >>> > > > >
> >>> > > > > On Mon, Jun 16, 2014 at 10:02 PM, Aaron McCurry <
> >>> amccurry@gmail.com>
> >>> > > > > wrote:
> >>> > > > >
> >>> > > > > > On Mon, Jun 16, 2014 at 12:00 PM, Dibyendu Bhattacharya
<
> >>> > > > > > dibyendu.bhattachary@gmail.com> wrote:
> >>> > > > > >
> >>> > > > > > > I got 0 results. It was Record query.
> >>> > > > > > >
> >>> > > > > >
> >>> > > > > > And if you run the same query without any of the
sort feature
> >>> > turned
> >>> > > on
> >>> > > > > do
> >>> > > > > > you get a different result?
> >>> > > > > >
> >>> > > > > >
> >>> > > > > > >
> >>> > > > > > > Dib
> >>> > > > > > > On Jun 16, 2014 9:08 PM, "Aaron McCurry" <
> amccurry@gmail.com
> >>> >
> >>> > > wrote:
> >>> > > > > > >
> >>> > > > > > > > On Mon, Jun 16, 2014 at 10:19 AM, Dibyendu
Bhattacharya <
> >>> > > > > > > > dibyendu.bhattachary@gmail.com> wrote:
> >>> > > > > > > >
> >>> > > > > > > > > Hi Aaron,
> >>> > > > > > > > >
> >>> > > > > > > > > I wanted to implement sorting of
records during search,
> >>> but
> >>> > it
> >>> > > > > seems
> >>> > > > > > > > > sorting feature not working.
> >>> > > > > > > > >
> >>> > > > > > > > > This is what I tried.
> >>> > > > > > > > >
> >>> > > > > > > > > I defined a Column Definition  as
long type and set the
> >>> > > sortable
> >>> > > > as
> >>> > > > > > > true
> >>> > > > > > > > > during table creation, and populate
the long field with
> >>> > > timestamp
> >>> > > > > > value
> >>> > > > > > > > > during indexing.
> >>> > > > > > > > >
> >>> > > > > > > > > During query I used ( timestamp
is the column name that
> >>> is
> >>> > > > > sortable)
> >>> > > > > > > > >
> >>> > > > > > > > > Query query = new Query();
> >>> > > > > > > > > query.setQuery(queryString);
> >>> > > > > > > > >  BlurQuery blurQuery = new BlurQuery();
> >>> > > > > > > > > blurQuery.setQuery(query);
> >>> > > > > > > > > blurQuery.setStart(pageSize);
> >>> > > > > > > > >  blurQuery.setFetch(fetchSize);
> >>> > > > > > > > > blurQuery.addToSortFields(new SortField("family",
> >>> > "timestamp",
> >>> > > > > > true));
> >>> > > > > > > > >  Selector selector = new Selector();
> >>> > > > > > > > > selector.setRecordOnly(true);
> >>> > > > > > > > >  selector.addToColumnFamiliesToFetch("family");
> >>> > > > > > > > >  blurQuery.setSelector(selector);
> >>> > > > > > > > >
> >>> > > > > > > > > results = client.query("table",
blurQuery);
> >>> > > > > > > > >
> >>> > > > > > > > >
> >>> > > > > > > > > But this does not return any result.
> >>> > > > > > > > >
> >>> > > > > > > >
> >>> > > > > > > > What is the result?  An error?  Or 0
results?
> >>> > > > > > > >
> >>> > > > > > > > Also there can be some confusion about
Record and Row
> query
> >>> > > results
> >>> > > > > > > because
> >>> > > > > > > > they are stored in two different fields.
> >>> > > > > > > >
> >>> > > > > > > >
> >>> > > > > >
> >>> > > >
> >>> >
> >>>
> http://incubator.apache.org/blur/docs/0.2.2/Blur.html#Struct_FetchResult
> >>> > > > > > > >
> >>> > > > > > > > Let me know if there is anything else
I can help with.  I
> >>> will
> >>> > > > rerun
> >>> > > > > > some
> >>> > > > > > > > tests later today to make sure that the
feature does in
> >>> fact
> >>> > > work.
> >>> > > > > > > >
> >>> > > > > > > > Aaron
> >>> > > > > > > >
> >>> > > > > > > >
> >>> > > > > > > > >
> >>> > > > > > > > > My schema is very simple, we have
one record for every
> >>> row
> >>> > and
> >>> > > > > every
> >>> > > > > > > > > record have around 5 columns.
> >>> > > > > > > > >
> >>> > > > > > > > > Can you please let me know if I
am missing anything.
> >>> > > > > > > > >
> >>> > > > > > > > > Regards,
> >>> > > > > > > > > Dibyendu
> >>> > > > > > > > >
> >>> > > > > > > > >
> >>> > > > > > > > >
> >>> > > > > > > > >
> >>> > > > > > > >
> >>> > > > > > >
> >>> > > > > >
> >>> > > > >
> >>> > > >
> >>> > >
> >>> >
> >>>
> >>
> >>
> >
>

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