SourceForge.net Logo
Main Overview Wiki Issues Forum Build Fisheye
Issue Details (XML | Word | Printable)

Key: CMP-903
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Shay Banon
Reporter: rajeshaindurthi
Votes: 0
Watchers: 0
Operations

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

Error while implementing filtering in compass

Created: 27/Oct/09 09:10 AM   Updated: 27/Oct/09 09:10 AM
Component/s: Compass::Core
Affects Version/s: 2.2.0 RC1
Fix Version/s: None

Environment: compass 2.20 , Lucene 2.4.1, Websphere application server, Spring 2.x, Hibernate


 Description  « Hide
Error while implementing filtering , I am following the following forum post to implement filtering.

http://forum.compass-project.org/thread.jspa?threadID=216407&tstart=0.

However the results are not getting filtered as expected. Please find my question regarding this in the post.

http://forum.compass-project.org/thread.jspa?threadID=216407&tstart=0

After some debugging I realized that the buildQuery method in the SearchHelper, which builds the query object which is actually submitted to the lucene engine to get the hits does not have the filter object set. Even though the client sets the filter in the search object, this method is not setting the filter object while building the query object and hence the error. Please find the code for buildQuery method below.

protected CompassQuery buildQuery(CompassSearchCommand searchCommand, CompassSession session) {
if (searchCommand.getCompassQuery() != null) { return searchCommand.getCompassQuery(); }
return session.queryBuilder().queryString(searchCommand.getQuery().trim()).toQuery();
}



 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.