Main Overview Wiki Issues Forum Build Fisheye
Issue Details (XML | Word | Printable)

Key: CMP-916
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Shay Banon
Reporter: rodriguez nicolas
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.

Error when I add a sorter

Created: 04/Jan/10 12:14 PM   Updated: 08/Jan/10 08:22 AM
Component/s: Compass::Core
Affects Version/s: 2.2.0 GA
Fix Version/s: None

 Description  « Hide
I have a class with a property that is searchable:

@SearchableProperty(name = "creationDate",index = Index.NOT_ANALYZED, store = Store.YES)

when I create a CompassQuery and I add it a SortFilterParameter with this property. The search throw the next exception:

"field creationDate does not appear to be indexed"


 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Shay Banon added a comment - 08/Jan/10 06:48 AM
Can you create a simple test case for this?

rodriguez nicolas added a comment - 08/Jan/10 08:22 AM
My class called ContentReference contain the next property:

@SearchableProperty(name = "creationDate",index = Index.NOT_ANALYZED, store = Store.YES)
public Date getCreationDate() { return creationDate; }

and the code for get data is the following:

return new CompassCallback<CompassDetachedHits>() {

public CompassDetachedHits doInCompass(final CompassSession session) {

CompassQueryBuilder builder = session.queryBuilder();
CompassQuery compassQuery = builder.bool().toQuery();
SortFilterParameter sort ="creationDate", true)
if (sort.isDesc())
compassQuery.addSort(sort.getTerm(), SortDirection.REVERSE);
CompassHits activeHits = compassQuery.hits(); (1)

and in the line (1) is where the exception is threw.