SOLR-2444: change fl=key=a to fl=key:a

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1088820 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yonik Seeley 2011-04-04 23:23:59 +00:00
parent 7d236abb4e
commit 252c86beb9
3 changed files with 7 additions and 5 deletions

View File

@ -693,7 +693,8 @@ public class QueryParsing {
pos++;
while (pos < end) {
ch = val.charAt(pos);
if (!Character.isJavaIdentifierPart(ch) && ch != '.' && ch != ':') {
// if (!Character.isJavaIdentifierPart(ch) && ch != '.' && ch != ':') {
if (!Character.isJavaIdentifierPart(ch) && ch != '.') {
break;
}
pos++;

View File

@ -162,7 +162,7 @@ public class ReturnFields
char ch = sp.ch();
if (field != null) {
if (sp.opt('=')) {
if (sp.opt(':')) {
// this was a key, not a field name
key = field;
field = null;
@ -180,7 +180,7 @@ public class ReturnFields
}
if (key != null) {
// we read "key = "
// we read "key : "
field = sp.getId(null);
ch = sp.ch();
if (field != null && (ch==' ' || ch == ',' || ch==0)) {

View File

@ -52,6 +52,7 @@ import org.apache.solr.common.util.XML;
import org.apache.solr.common.util.NamedList;
import org.apache.solr.common.params.CommonParams;
import org.apache.solr.common.params.FacetParams;
import org.junit.Ignore;
import org.junit.Test;
/**
@ -380,7 +381,7 @@ abstract public class SolrExampleTests extends SolrJettyTestBase
}
@Test
@Test @Ignore // TODO: re-enable when new transformer syntax is implemented
public void testAugmentFields() throws Exception
{
SolrServer server = getSolrServer();
@ -405,7 +406,7 @@ abstract public class SolrExampleTests extends SolrJettyTestBase
SolrQuery query = new SolrQuery();
query.setQuery( "*:*" );
query.set( CommonParams.FL, "id,price,_docid_,_explain:nl_,score,aaa=_value:aaa_,ten=_value:int:10_" );
query.set( CommonParams.FL, "id,price,_docid_,_explain:nl_,score,aaa:_value:aaa_,ten:_value:int:10_" );
query.addSortField( "price", SolrQuery.ORDER.asc );
QueryResponse rsp = server.query( query );