I want to search through my content using Solr. My question is, is there a possibility to search for a text, which contains a certain character sequence?
Example: I have a text like "This is my Regitrationmail"
I want a query for the search of "registration" or "mail" or even "Registrationm" etc. etc.
Also the query should match if the content or the title match the query.
this is my current query:
q=text:registration~20
Thanks for your help!
Related
I want to be able to also search by specific field when i search in the search box.
Solr already has a 'text' field that is used by default and this field also covers other fields (e.g. title, notes, tags). It works when I query in Solr without specifying any fields. But when I search without specifying a field in the CKAN search box, it doesn't work.
This is exactly what I want:
When I type "example" directly instead of "title:example", I want it to automatically search in the fields specified in the CKAN schema.
You should have enabled datastore extension to perform full text search
q (string or dictionary) – full text query. If it’s a string, it’ll
search on all fields on each row. If it’s a dictionary as {“key1”:
“a”, “key2”: “b”}, it’ll search on each specific field (optional)
https://docs.ckan.org/en/2.9/maintaining/datastore.html#ckanext.datastore.logic.action.datastore_search
I am querying a SQL Server DB. I have a field "Remarks" that contains values pipe delimited as such
59P|W26|W511|862|W51
I'm trying to search in this field for an exact match, for example in the above I just want to return W51 not W511. I thought contains would help but unfortunately the table is not full text indexed and I dont have the ability to change that. Any suggestions?
It looks like you can do this using sql server because it has a useful built in function. Check out https://www.sqlservertutorial.net/sql-server-string-functions/sql-server-string_split-function/
I'm using Azure Search to query a data set relating to documents. I'm querying the data to fetch the documents that are owned by a particular user based on their email address.
The data set within the index contains a column called UploadedBy which represents the user who uploaded the document.
My query looks like this.
search=myuseremail#mycompany.com&searchFields=UploadedByEmail
The search query speficies the value to look for and the column in which to search for it. However, I'm getting results returned that do not match this search criteria i.e. where the email address contains a different email address.
How do I prevent these from being returned? Am I missing something from my seach?
probably you're getting results that match:
myuseremail#abcde.com
and
*#mycompany.com
this is not wrong, it's the expected behavior since an email has '.' and it's considered a stop word. If you want the exact match, you should use search="myuseremail#mycompany.com", escape your '.' or replace them to another char that is not a stop word.
As another option, use a custom analyzer to avoid breaking on "." for emails.
We have implemented Site search for our project. Nutch is used for crawling the content of the site.
Currently, we have all the records being crawled and indexed in SOLR and the search functionality works for any keyword search.
Issue we are facing is the search result relevancy, we are not able to perform boost on fields and show the result.
For example, we are indexing the fields title, description, keywords, URL and content.
When I search for any keyword “XYZ”, all the records with this keyword are displayed based on the term frequency.
However, when I give boost to the field title in query filter-
a. Title^5 – search results are displayed which has the keyword in title, but it is not picking the records with “XYZ” in content.
b. Title^5 content^1.1 – in this scenario, search results are not displayed based on the title relevancy, and the default term frequency behavior is noted.
i need to develop a search application , where many documents are indexed with different fields and a id field which is unique for each of the document . Fields are not stored just indexed except for id field
i need to find out for each document , the documents similar to this, here all i have is unique id field of current document , i dont have any other fields of current document to form Terms and query the index for finding similar documents like current one.
How do i do this ? any help greatly appreciated .
I believe the simplest way to do this is to use Solr, and use Solr's MoreLikeThisHandler.
You can use a query likehttp://localhost:8983/solr/select?q=unique_id:2722&mlt=true&mlt.fl=manu,cat&mlt.mindf=1&mlt.mintf=1&fl=id,score
Do you have any control over how these documents are indexed? You can index with term vectors, and at query time, look up the term vector for the document, construct a query using the terms, and submit the query.