Search algorithm of my website search - algorithm

I have business web dire ctory and have a problem with the search algorithm.Lets say i have category: "Accountants".But when a user make a search and type lets say: "Accounting Companies" or "Accountancy" ,the results from the category "Accountants" will not come up.How can i solve this problem?I mean is there a way to include all synonyms and different versions of category names in the search algorithm?
P.S: My site is built with CakePHP framework

I would use elastic search + soundex. if you search is really simple and you dont need use elasticsearch or other tool, look how to use soundex in your database enginner.

Related

'loosen up' Laravel Scout's search functionality to return more results with database driver

I'm using Laravel Scout with the driver set as database to create a searchable knowlegde base.
The issue i've currently got it that I would like each word in the search term to be searched for an return all results that have any of the words rather than an exact match.
So for example:
search term: pay a bill
database records contain: pay my bill, how to pay a bill, paying my bill
With my current setup, it wont return any of these results as none of them match the exact term searched.
Is there anything I can do in Scout to make it loosely search each word?
I can achieve this by using whereFullText() but I wanted to keep this within Scout and using ::search() if possible.

Multilingual search in elastic search

I want to search for "Salt" in my app (using elastic search). I want to search in my native language. So when I search "namak", I should get the result of all products related to "salt".
The easiest way I can think of would be adding a field to your elasticsearch that contains the same words as the english ones, but in your native language. The easiest way to do that is probably to change data before it is loaded into elasticsearch.
Example using python and pandas, and assuming you have a dictionnary named dic that maps english words to your native tongue's words (e.g. {"Salt": "namak"}), you'd simply do :
df["other_language"] = df["english"].replace(dic)
And then proceed and load df into elasticsearch as you would normally do.
In elasticsearch, what then happens is that every document having Salt in one of its fields now also has namak in the field other_language, thus, searching for namak filters out the exact same documents as searching for Salt would.

Elastic Search and Search Ranking Models

I am new to Elastic Search. I would like to know if the following steps are how typically people use ES to build a search engine.
Use Elastic Search to get a list of qualified documents/results based on a user's input.
Build and use a search ranking model to sort this list.
Use this sorted list as the output of the search engine to the user.
I would probably add a few steps
Think about your information model.
What kinds of documents are you indexing?
What are the important fields and what field types are they?
What fields should be shown in the search result?
All this becomes part of your mapping
Index documents
Are the underlying data changing or can you index it just once?
How are you detecting new docuemtns/deletes/updates?
This will be included in your connetors, that can be set up in multiple ways, for example using the Documents API
A bit of trial and error to sort out your ranking model
Depending on your use case, the default ranking may be enough.
have a look at the Search API to try out different ranking.
Use the search result list to present the results to the end user

Google Search Appliance sort by metadata content

I'm trying to refine the search results received by my application by including the sort parameter in my HTTP requests. I've combed through the documentation here, but I can't find exactly what I'm looking for.
I'm searching for DOC filetypes, and I am able to sort by date or sort by metadata, as in alphabetizing by title, author, etc. I can also filter by whether or not the title contains certain keywords. What I want to do is to sort by whether or not the title contains certain keywords (these documents appearing first in the results), but to still keep the other results.
For example, with keywords [winter, Christmas, holiday] I could do a descending sort by the sum of inmeta:title~winter, inmeta:title~Christmas, inmeta:title~holiday and the top result might be
Winter holidays other than Christmas
followed by documents with one or two of the keywords, followed by documents that meet the other search parameters but contain no keywords.
Is this possible in GSA?
I finally achieved what I was trying to do, so figured I'd post in case it helps anyone else.
As far as I know, it is impossible to create a query with this capability, but with Google's Custom Search API, you can create a search engine with the desired keywords in the context file (by editing the XML file directly or by adding keywords through the CSE console). Then you can formulate the query as usual, but perform the search on your personalized engine.
https://developers.google.com/custom-search/docs/ranking

Google custom search: Query limit, create links to search result page?

I am planning to create a custom search for my website and just want to consider below points
Is there any query limit/day with Google Custom Search?
Can we create direct link to search result page of Custom Search, like
http://xyz.com/result.htm?cx=partner-pub-0567817491096263%3Acozw148egu5&cof=FORID%3A9&ie=UTF-8&q=%E0%A4%AD%E0%A4%BE%E0%A4%B0%E0%A4%A4+&sa=Search&lid=HI&siteurl=localhost%3A88%2Findex.htm%3Flid%3Dhi
Is it legal or breaking any Terms of Services?
The CS limit is 100 queries/day (afterwards it will cost you).
You should be aware that the custom search is limit to 100 results.
AFASIK - there is no legal limitation of creating direct links. After all you pay per query.

Resources