I have the following query:
{!join from=conceptNcid to=ncid fromIndex=hdd_rel_tst}relationshipNcid:364
which I implemented in Spring:
Criteria criteria = new Criteria("relationshipNcid").is("364");
SimpleQuery search = new SimpleQuery(criteria, pageable);
search.setJoin(Join.from("conceptNcid").fromIndex("hdd_rel_tst").to("ncid"));
Page<T> results = solrTemplate.queryForPage(search, myclass);
This query works great.
However, when I attempt to negate the query (using the minus sign at the
beginning):
-{!join from=conceptNcid to=ncid fromIndex=hdd_rel_tst}relationshipNcid:364
with this code:
Criteria criteria = new Criteria("relationshipNcid").is("364").not();
SimpleQuery search = new SimpleQuery(criteria, pageable);
search.setJoin(Join.from("conceptNcid").fromIndex("hdd_rel_tst").to("ncid"));
Page<T> results = solrTemplate.queryForPage(search, myclass);
it does not work. Notice where I put the 'not()' on the first line. This
actual executes this query:
{!join from=conceptNcid to=ncid fromIndex=hdd_rel_tst}-relationshipNcid:364
I know this is the wrong place, but I can't see how to negate the entire query
in the java code. It seems to need a 'not()' method for the SimpleQuery class
since the join is placed on the query, but I can't see anything in the
documentation.
Any ideas?
Todd Stevenson