Error for Graph Traversal using Streaming Expressions
Hi, I am getting this error when I tried to run a query for Graph Traversal using Streaming Expressions: { "result-set":{ "docs":[{ "EXCEPTION":"java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.io.IOException: java.util.concurrent.ExecutionException: java.io.IOException: --> http://localhost:8983/solr/email/: An exception has occurred on the server, refer to server log for details.", "EOF":true, "RESPONSE_TIME":11}]}} Below is my query: http://locahost:8983/solr/email/stream?expr=gatherNodes(email, walk="ed...@mail.com->from", gather="to")&indent=true What could be the reason? I'm using Solr 6.4.1 at the moment. Regards, Edwin
Re: q=-id:xxxx in export handler does not work but works ok in select.
Hi Erick, It looks like solr by default takes care of adding the *:* for /select API for NOT queries like this. In the newer /export API, it is not doing that by default. So, it is kind of inconsistent, and a lot of users will run into this if they try to use the /export api for streaming results. I think the ExportQParserPlugin which /export API calls is missing to automatically add this. Is it possible to fix this in solr, so that /export and /select APIs work similarly? Thanks Sundeep On Sun, Mar 12, 2017 at 9:13 AM, Erick Erickson wrote: > Oh, you're running into a "quirk" of Solr. Pure negative queries in > main clauses require a *:* in front unless there's some special > handling. So try: > q=*:* -id:8733 > instead in both cases. > > Best, > Erick > > On Sun, Mar 12, 2017 at 7:57 AM, radha krishnan > wrote: > > q=-id: in export handler does not work but works ok in select. > > > > Works: > > http://localhost:8983/solr/bucket4/select?q=id:8733*&; > rows=1&sort=_version_%20desc&fl=id > > Does not work: > > http://localhost:8983/solr/bucket4/export?q=id:8733*&; > rows=1&sort=_version_%20desc&fl=id > > > > looks a bug with solr or am i making a mistake here > > > > > > Thanks, > > Radhakrishnan >
Re: Iterating sorted result docs in a custom search component
This really looks like re-inventing Streaming Aggregation/Streaming Expressions. Admittedly, the processing will probably be faster if done internally, but if response time isn't super-critical you might want consider. If the Streaming stuff (including ParallelSQL) works you will need to upgrade, 6.4.2 is the latest release. But to answer your question, "no". Sorting is a post-match operation. I.e. once the doc is selected for _possible_ inclusion in the result set, it's matched against the current top N then put in the list or discarded so your collectors don't see docs in sorted order. Best, Erick On Sun, Mar 12, 2017 at 5:54 AM, alexpusch wrote: > I hope this is the right place to ask about custom search components. > > I'm writing a custom search component. My aim is iterate over the entire > result set and do some aggregate computation. In order to implement my > algorithm I require to iterate over the result set in the order declared in > the search query. > > I've taken statsComponent as a relevant example. It iterates over the > results using rb.getResults().docSet and searcher.getIndexReader().leaves() > but it seems that these methods does not respect the query sort order. > > I've tried creating a new TopCollector and requesting it to collect all the > data. It works but takes too long. > > Is there a way to iterate over the sorted result set in an efficient way? > I'm working on solr 4.11, but upgrading to a newer version is acceptable if > necessary. > > Thanks! > > > > -- > View this message in context: > http://lucene.472066.n3.nabble.com/Iterating-sorted-result-docs-in-a-custom-search-component-tp4324497.html > Sent from the Solr - User mailing list archive at Nabble.com.
Re: Iterating sorted result docs in a custom search component
The /export handler does exactly what you described, but it stream documents rather trying to sort everything in memory at once. In Solr 4.11 the class is called SortingResponseWriter. You can take a look at the approach used. Joel Bernstein http://joelsolr.blogspot.com/ On Sun, Mar 12, 2017 at 8:54 AM, alexpusch wrote: > I hope this is the right place to ask about custom search components. > > I'm writing a custom search component. My aim is iterate over the entire > result set and do some aggregate computation. In order to implement my > algorithm I require to iterate over the result set in the order declared in > the search query. > > I've taken statsComponent as a relevant example. It iterates over the > results using rb.getResults().docSet and searcher.getIndexReader(). > leaves() > but it seems that these methods does not respect the query sort order. > > I've tried creating a new TopCollector and requesting it to collect all the > data. It works but takes too long. > > Is there a way to iterate over the sorted result set in an efficient way? > I'm working on solr 4.11, but upgrading to a newer version is acceptable if > necessary. > > Thanks! > > > > -- > View this message in context: http://lucene.472066.n3. > nabble.com/Iterating-sorted-result-docs-in-a-custom- > search-component-tp4324497.html > Sent from the Solr - User mailing list archive at Nabble.com. >
Re: q=-id:xxxx in export handler does not work but works ok in select.
Oh, you're running into a "quirk" of Solr. Pure negative queries in main clauses require a *:* in front unless there's some special handling. So try: q=*:* -id:8733 instead in both cases. Best, Erick On Sun, Mar 12, 2017 at 7:57 AM, radha krishnan wrote: > q=-id: in export handler does not work but works ok in select. > > Works: > http://localhost:8983/solr/bucket4/select?q=id:8733*&rows=1&sort=_version_%20desc&fl=id > Does not work: > http://localhost:8983/solr/bucket4/export?q=id:8733*&rows=1&sort=_version_%20desc&fl=id > > looks a bug with solr or am i making a mistake here > > > Thanks, > Radhakrishnan
Re: Simple sql query with where clause doesn't work
This has really nothing to do with SQL. What's happening is that the query doesn't think you're specifying a field and it's looking for _text_ which will be defined in your solrconfig file with a "df" parameter for the query handler. That said, the query appears malformed or it's a cut/paste error. You use single quotes to open and a double quote to close: 'stmt=select fieldA from collection where field='123'' you probably want something like "stmt=select fieldA from collection where field='123' '' Best, Erick On Sun, Mar 12, 2017 at 6:33 AM, adfel70 wrote: > Seems like this only happend when the value is not a number > > > curl --data-urlencode 'stmt=select fieldA from collection where field='123'' > http://host:port/solr/collection/sql?aggregationMode=facet > > works. > while this one doesnt work: > > curl --data-urlencode 'stmt=select fieldA from collection where field='abc'' > http://host:port/solr/collection/sql?aggregationMode=facet > > Again, the same message with "no field name specified in query and no > default specified via df param". > > tried this on multiple field types. > example of field settings: type=string, indexed=true, stored=true, > omitNorms=true, multiValued=false, docValues=true. > > Note that this collection was indexed as nested documents, but while trying > the sql, I'm not using anything related to the nested format (except that > the data itself was indexed this way) > > > > -- > View this message in context: > http://lucene.472066.n3.nabble.com/Simple-sql-query-with-where-clause-doesn-t-work-tp4324498p4324499.html > Sent from the Solr - User mailing list archive at Nabble.com.
Iterating sorted result docs in a custom search component
I hope this is the right place to ask about custom search components. I'm writing a custom search component. My aim is iterate over the entire result set and do some aggregate computation. In order to implement my algorithm I require to iterate over the result set in the order declared in the search query. I've taken statsComponent as a relevant example. It iterates over the results using rb.getResults().docSet and searcher.getIndexReader().leaves() but it seems that these methods does not respect the query sort order. I've tried creating a new TopCollector and requesting it to collect all the data. It works but takes too long. Is there a way to iterate over the sorted result set in an efficient way? I'm working on solr 4.11, but upgrading to a newer version is acceptable if necessary. Thanks! -- View this message in context: http://lucene.472066.n3.nabble.com/Iterating-sorted-result-docs-in-a-custom-search-component-tp4324497.html Sent from the Solr - User mailing list archive at Nabble.com.
q=-id:xxxx in export handler does not work but works ok in select.
q=-id: in export handler does not work but works ok in select. Works: http://localhost:8983/solr/bucket4/select?q=id:8733*&rows=1&sort=_version_%20desc&fl=id Does not work: http://localhost:8983/solr/bucket4/export?q=id:8733*&rows=1&sort=_version_%20desc&fl=id looks a bug with solr or am i making a mistake here Thanks, Radhakrishnan
Re: Simple sql query with where clause doesn't work
Seems like this only happend when the value is not a number curl --data-urlencode 'stmt=select fieldA from collection where field='123'' http://host:port/solr/collection/sql?aggregationMode=facet works. while this one doesnt work: curl --data-urlencode 'stmt=select fieldA from collection where field='abc'' http://host:port/solr/collection/sql?aggregationMode=facet Again, the same message with "no field name specified in query and no default specified via df param". tried this on multiple field types. example of field settings: type=string, indexed=true, stored=true, omitNorms=true, multiValued=false, docValues=true. Note that this collection was indexed as nested documents, but while trying the sql, I'm not using anything related to the nested format (except that the data itself was indexed this way) -- View this message in context: http://lucene.472066.n3.nabble.com/Simple-sql-query-with-where-clause-doesn-t-work-tp4324498p4324499.html Sent from the Solr - User mailing list archive at Nabble.com.
Simple sql query with where clause doesn't work
Hi I'm trying to play with /sql feature. working with solr 6.4.2 running curl --data-urlencode 'stmt=select fieldA from collection' http://host:port/solr/collection/sql?aggregationMode=facet work fine. running curl --data-urlencode 'stmt=select fieldA from collection where fieldB='value'' http://host:port/solr/collection/sql?aggregationMode=facet doesn't work. throws: undefined field _text_ I dont have _text_ field in the schema but I also don't query on it so I'm wondering what the problem is.. Thanks. -- View this message in context: http://lucene.472066.n3.nabble.com/Simple-sql-query-with-where-clause-doesn-t-work-tp4324498.html Sent from the Solr - User mailing list archive at Nabble.com.