How to combine fuzzy search and field boosting - search

I'm developing a Lucene search for my Zend 1.12 site. I would like to combine fuzzy search and field boosting. I try syntax like
title:"query"^10~0.8 OR description:"query"~0.8
It seems not to change results. I've also tried to find hints on the Internet, nobody had similar problem. This is query for particular setting and field boosting cannot be set in advance.
The question is: does Lucene support such a combination of modifiers? Is this syntax correct?

Related

Drupal 8 search api solr want to get all items

i´m using drupal8 with solr 7.4 and the search api module. I don´t find a way to configure the search api to get all indexed items by searching with ""(nothing an put enter) or searching by "*". How can i enable such a search behavior?
Thanks a lot
Tim
As upto my understanding on your question, You can Create Facets and configure the filters by specific taxonomy terms or content types. Before that check the fields what you are indexing into the solr.

Azure search, search by partial terms

Here are two examples for search in the portal, where I would expect to get some results in the second search, even with one letter missing.
The search is in Hebrew language
The full term return some results,
The same term with one letter missing return no results,
There are a few ways you can search for partial terms in Azure Search. You'll need to decide which of the following methods will work best in your scenario. Based on the example it seems either fuzzy search or prefix search will do the job. You can learn about the differences between the these methods in the documentation.
Fuzzy search: blog, documentation
Wildcard search, specifically prefix search: documentation
Regular expression search: documentation
Index partial terms by defining a custom analyzer: blog, documentation
Let me know if you have any questions about any of the above
Check this answer I solve this using a regex and change the GET by a POST request.

Azure Search Spell mistake handling

My application is in MVC and I have a search text box based on azure index, its working fine however I have a scenario where in if I enter "chres Harris" instead of "chris Harris" it should return result "chris Harris" but it returns different result like "bob Harris" and then "chris harris", I want the results to be nearabout the same even if there is a spell mistake, please help will any index scoring profile, parameter boost or something useful ?
As of now there are two ways you can handle spelling mistakes in Azure Search.
Use fuzzy queries with Lucene query language. You can boost relevance of exact matches over fuzzy matches for example, search=term^2 OR term~2.
If you deal with names of things, like in your example, configure your index to support phonetic search. Different boosting options to influence relevance are described in the article.
Let me know if none of them don't works for you.

How to blacklist/demote search results with certain set of keywords in ElasticSearch and Apache Solr?

I was comparing both ElasticSearch and Apache Solr for a search solution. Data that will go into the system is not moderated and I don't want anyone to search for something and some sexually explicit content to flash on the very top of the search result. But I don't want to remove them for search results either. I want to demote them, so that they come later in the search results. Can I do this in Solr or ElasticSearch ? Some pointers towards how to achieve this will be helpful.
In Solr you can't give "negative boosts" per se but you can boost everything that doesn't have the term. This can be done with the boost query:
...&bq=(*:* -erotic)^999
or in solrconfig.xml:
<str name="bq">(*:* -erotic)^999</str>
Where "erotic" is the term to which you wish to give a "negative boost". To add another term, add another bq=....

How to use lucene query syntax on Orchard CMS

I would like to use the full Lucene query syntax on an Orchard CMS based Website.
Currently, after enabling the indexing and search on Orchard, I can search on the website according to the fields I selected on the Orchard search administration page,
but I cannot perform one search on a particular field only (without changing the behavior on the entire search)
I cannot use fuzzy search...
From the logs, I can see that Orchard take care of that part (providing Lucene a good query syntax), but I would like to do it on my own.
For example, when searching "wel" on the website, Orchard will send to Lucene this query : title:wel* body:wel* (if I have the title and body fields activated on the search).
I did see some blogs that talk about coding some features to customize search, but I would like to be sure I'm not missing something before switching to developer mode :)
There are so many scenarios that can be done with search that there is no way to provide such coverage out of the box, which is why the API is very simple to use if you need custom searching capabilities.
You should copy-paste the controller from the search module and use the Parse() method of the ISearchBuilder with the escape parameter to false. This will parse a pure lucene query. You can also use the WithField("body", "value") to do simpler field search.
I don't believe anyone has released any modules that provide additional search functionality, because if you need it, it is so simple to develop ^_^ So yes, you will have to go dev mode to do custom field search

Resources