Implementing a docs search for multiple docs sites - search

We have many different documentation sites and I would like to search a keyword across all of these sites. How can I do that?
I already thought about implementing a simple web scraper, but this seems like a very ugly solution.
An alternative may be to use Elasticsearch and somehow point it to the different doc repos.
Are there better suggestions?

Algolia is the absolute best solution that I can think of. There's also Typesense and Meilisearch of course.
Algolia is meant specifically for situations like yours, so it even comes with a crawler.
https://www.algolia.com/products/search-and-discovery/crawler/
https://www.algolia.com/
https://typesense.org/
https://www.meilisearch.com/
Here's a fun page comparing them (probably a little biased in Typesense's favor)
https://typesense.org/typesense-vs-algolia-vs-elasticsearch-vs-meilisearch/
Here are some example sites that use Algolia Search
https://developers.cloudflare.com/
https://getbootstrap.com/docs/5.1/getting-started/introduction/
https://reactjs.org/
https://hn.algolia.com/
If you personally are just trying to search for a keyword, as long as they're indexed by Google, you can always search with the format site:{domain} "keyword"

You can checkout Meilisearch for your use case. Meilisearch is a Rust based and open sourced search engine.
Meilisearch comes with a document scraper tool ( https://github.com/meilisearch/docs-scraper ) that can scrape content and then also index it.
While using it you need to define what exact content you are searching for in the configuration file for the scraper tool. And then you can run the tool using Docker.

Related

Verbatim search in azure/cognitive/bing web search (API, not website)

I cannot find any option to achieve a verbatim azure/cognitive/bing Web search.
In my case the difference is trying to sift through tens of millions of irrelevant search results to find the 10 results that actually match my query literally.
Even though I am a paying customer, there is no support available. And the API documentation did not help either.
I would think it should be super easy to provide a verbatim search option. Is there one that I did not see?
I checked further and it seems for the Bing Search APIs - +"phrase" works and returns documents containing this phrase at the top. Just add + in front of what you have been trying. Support link is here: https://azure.microsoft.com/en-us/support/plans/.

Search a specific search of a journal article based on the user type

I have this requirement:
We have a journalarticle and we wish to have sections which have content for internal and external users for the application.
We are able to hide the content from rendering by implementing custom template on web content display and using a simple custom-field for a user which helps us to classify it.
Having said that when we search something as an external user, the search portlet is able to fetch an article where the search text is a part of internal user content, and due to the above mentioned template the content is not visible.
In short, from the user's perspective the resultant article does not match the searched term.
I wish to seek some pointer to check whether there is a mechanism to ensure that when an external user searches something then we only search the dynamic-element of the doc which matches the user type?
We have thousands of such articles and create multiple copy of the same article does not seems viable solution.. so any pointers would be a great help.
Liferay version : 6.2 GA4 CE
Thanks!
AJ
First of all: Not finding a search term in a document can be a sign of good working synonym resolution in the search engine. It's questionable if this behaviour is always wrong or only in this particular case. Remember google bombs?
That being said, I believe that this architecture of half-visible documents is flawed from the beginning. Ideally I'd suggest to change it, for example by splitting the information to two articles, so that you can use the standard permissions to resolve. If you link both, you can determine how/which article or template to use. It's not an ideal solution, but might be a workaround.
Another workaround might be to change Liferay's indexer component and index two different versions of the article, with two different permissions. Of course, you'll have to change the search side as well, so that you'll find each article at most once, even if it's now twice in the search engine.
Again - not ideal, but might be the quickest fix that you can get right now without changing the underlying architecture. However, to change the underlying architecture is my actual recommendation.

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

can you have "variables" in text in google sites?

Sorry, this is a bad question. I don't even know what the title should be. I'm a total noob at making websites so this might be easy to find but I just don't know the terminology to search for. I cannot find anything about how to do this...
What I want to do is have something like references/variables that I can use in a block of text and it will automatically get replaced with whatever value should be there. Best way I can think of to describe it would be if I was using the site as a design doc for a game or something, I would be able to type in [Title] or something similar on any page and when it loads that text would be replaced with whatever my Title is. That way If I ever change titles, names, classes, races, places, items, etc... they would only have to be changed in 1 place and the change would be reflected everywhere.
I notice if I add a link to a page it will automatically use the Title of that page as the text of the link. That is almost exactly what I want. Except when I change the Title of the other page the text of the link remains as the original text. It doesn't get updated to the new Title and that is not at all what I want.
Also, I want to do this in Google Sites and as simply as possible. I don't really want to use a database. I was hoping Google Sites would have some kind of funcionality for this.
I don't believe this is possible (on Google Sites) and likely you need to consider a hosted solution.
Quoting the answer from this relevant post:
You should consider hosting your solution using Google's App Engine
instead of Google Sites. You can set it up so it uses PHP (see link
below), you can configure it to use your domain name and you get
enough CPU, disk and bandwidth allowance to serve around five million
page views for free each month, if you are serving more than that,
their prices are extremely competitive.
Google App Engine:
http://code.google.com/appengine/docs/whatisgoogleappengine.html How
to setup PHP using Google App Engine: http://blog.caucho.com/?p=187
Also I'm not sure how your PHP skills are but if you're unfamiliar with it then this should help to get you started.

Grails (On App Engine) - Basic Search Functionality

What I need is Search Scaffolding but in its absence I was wondering if you could point me in the direction of any really simple examples for adding search to a domain.
I can't use the searchable plugin as it conflicts with the AppEngine plugin (Unless someone has got this to work?). I just need to be able to filter the scaffold list to contain only the results which match the query. I don't need a pure text box solution, I imagine it too look exactly like the 'create' form except when you submit you get a list of matching objects.
I hope this makes sense, thanks in advance!
Gav
Google App Engine - Full Text Search

Resources