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 Sorting in Apache Blur 0.2.2.
Date Mon, 16 Jun 2014 14:19:41 GMT
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.

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