Heliosearch / heliosearch

The next generation of open source search
http://heliosearch.org
90 stars 19 forks source link

Heliosearch issue with dynamic fields #35

Closed YasserAndWesam closed 9 years ago

YasserAndWesam commented 9 years ago

http://localhost:8080/solr/reports_core/select?q=764035_EXACT_PARTS%3A*&rows=0& json.facet= { MAIN_CATEGORYAndROHS:{ terms:{ field: MAIN_CATEGORY, facet:{ ROHS:{ terms:{ field: ROHS, facet:{ sum: "sum(764035_EXACT_PARTS)" } }
} }} }} ' keep in your mind (764035_EXACT_PARTS) is dynamic field, this quary raise an error message org.apache.solr.search.SyntaxError: Expected ',' at position 10 in 'sum(764035_EXACT_PARTS)'.

yonik commented 9 years ago

This is a more generic issue (one that exists in Solr too) - the function query parser does not like field names that start with numbers. try sum(field(764035_EXACT_PARTS))

YasserAndWesam commented 9 years ago

thanks very much for your support,your solution working fine.