first of all i've no rights to edit the schema because the client uses a hosted solr.
i try to finde the following word:
Coagulometerröhrchen
with this query:
&q=(röhrchen~)&defType=edismax
When i try to use the query like this:
&q=(*röhrchen*~)&defType=edismax
it's missing some keyresults
Is there a way to find the right results with a optimized query?
Solr-Version: 8.11.1
Related
Whenever I query a string in solr, i want to get the synonyms of field value if there exists any as a part of query result, is it possible to do that in solr
There is no direct way to fetch the synonyms used in the search results. You can get close by looking at how Solr parsed your query via the debugQuery=true parameter and looking at the parsedQuery value in the response but it would not be straightforward. For example, if you search for "tv" on a text field that uses synonyms you will get something like this:
$ curl "localhost:8983/solr/your-core/select?q=tv&debugQuery=true"
{
...
"parsedquery":"SynonymQuery(Synonym(_text_:television _text_:televisions _text_:tv _text_:tvs))",
...
Another approach would be to load in your application the synonyms.txt file that Solr uses and do the mapping yourself. Again, not straightforward,
I'm trying to use DataStax Cassandra/Solr integration to do a facet query with both pivot facets and interval facets
My query look like this:
select * from data where solr_query='{"facet":{"limit":5,"pivot":"event_type,key","interval":"past_visits","f.past_visits.facet.interval.set":["{!key=visit_13_month}[NOW-13MONTH/MONTH,NOW]","{!key=visit_1_month}[NOW-1MONTH/DAY,NOW]"]},"q":"*:*"}']
The error that I am getting back seems to show that the required parameter is not being set (but it is)
08:30:38.244 [New I/O worker #4] WARN c.d.driver.core.RequestHandler - /10.239.133.151:9042 replied with server error (Missing required parameter: f.past_visits.facet.interval.set (or default: facet.interval.set)), trying next host.
When i run an equivalent query directly to Solr (using query params), it works as expected.
/data/select?q=*:*&facet=true&facet.pivot=event_type,key&facet.limit=5&facet.interval=past_visits&f.past_visits.facet.interval.set=%7B!key=visit_13_month%7D[NOW-13MONTH/MONTH,NOW]&f.past_visits.facet.interval.set=%7B!key=visit_1_month%7D[NOW-1MONTH/DAY,NOW]"
I'm trying to follow the Datastax documentation at this link:
http://docs.datastax.com/en/datastax_enterprise/4.8/datastax_enterprise/srch/srchJSON.html
There seems to be something wrong with the way that I am creating the JSON for the Datastax Solr query, but I do not see what I should change.
We don't currently support facet intervals via CQL. Anyway, you don't need to repeat "facet", so it should eventually be something like the following:
select * from data where solr_query='{"facet" {"limit":5,"pivot":"event_type,key","interval":"past_visits","f.past_visits.interval.set":["{!key=visit_13_month}[NOW-13MONTH/MONTH,NOW]","{!key=visit_1_month}[NOW-1MONTH/DAY,NOW]"]},"q":"*:*"}']
My question is I found when I use wildcard in solr query, it will be very slow. So I don't want to use the wildcard(*) query, for example, I want to search the mail address (gosling.abc#gmail.com), if I input 'abc' keywords, my q parameter maybe like q:abc
How should I do with this condition?
I am newbie in solr, can anyone help me?
(Currently, I have 10,937,547 document in my solr cloud. My solr version is 4.1)
Solr version :
4.2.1
Objective:
I am trying to get a very simplistic Solr example off the ground
So far:
Installed solr
Was able to run the example\tutorial successfully http://lucene.apache.org/solr/4_2_1/tutorial.html
Next:
Now I am trying to create my own schema
I have created a schema : http://pastebin.com/vj4ATa8d
And a Test Doc:http://pastebin.com/7fvZ5GTQ
I have added the doc to Solr using the command
java -jar post.jar testdoc.xml
What’s working:
In Solr Admin- I can see the schema
I can see one document uploaded
I can go to Admin console and query as follows:
Specify q as “:”. This works- shows the document
http://localhost:8983/solr/collection2/select?q=*%3A*&wt=xml&indent=true
What does not work:
If I give q as Nashua- I see no results
This is the default search field
Other attributes didn't work either
http://localhost:8983/solr/collection2/select?q=Nashua&wt=xml&indent=true
The debug response http://pastebin.com/fTneyEba
You need to either copy your fields into the default search field (in this case text) or qualify your query with the field you want to search against:
.../select?q=city:Nashua&wt=xml&indent=true
Things to read up on:
Default Search Field
Copy Fields
Both are documented here:
https://wiki.apache.org/solr/SchemaXml
I am trying to make a query in solr.net that generates a solr query with a filter query with more than one term in it e.g.: fq=Size:(4 large)
However, when I pass ?f_Size=(4 large) in the query string to the SolrNet sample app (found here: http://code.google.com/p/solrnet/downloads/list), no results are found.
Looking at the logs, I can see that the filter query generated is fq=Size:"\(4+large\)" so it makes sense that no results are found.
Is there a way in SolrNet to generate a filter query with more than one term?
Where the filter queries are built, try replacing Query.Field(...).Is(...) with Query.Simple(...) (you have to build the query yourself). See the wiki for reference.