How to use lucene query syntax on Orchard CMS - search

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

Related

It's possible to search cql by Url confluence page

I'm using a cql search on my project, and on the search i use the default search and also searching by keyword title or text of the page context.
But i made some research to see if is possible to search by URL project and i saw like it's possible to search by Id, but i don't see nothing about URL. It's possible in some way? using CQL, or another way?

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.

Kentico smart search with custom web part

I have custom web part registered in Kentico web page and I would like to use Kentico smart search to search information from web part.
My custom web part contains grid view with following columns
Item Code
Item Name
Item Price
Mfg. Date
If user is going to enter "Laptops" in search box then system should search information based on Item Name.
Can anyone give me brief idea about Kentico smart search which satisfy above functionality?
Have you tried using the smart search index and set it to be the document crawler? In this case the crawler will index the HTML output of the pages - including the output of the web part.
I think you have a fundamental misunderstanding of how smart search operates.
Basically you'll use Smart search to index your database.
You can then use Kentico's Smart search API to filter a dataset to be used to bind into a repeater or datalist of some type.
The only thing I can suggest is consulting the Kentico documentation for your version of Kentico, specifically looking for smart search. If you included more information such as the Kentico version and the source of your data (documents, custom tables, etc) then someone may be able to give a clearer answer.

When to use which search technique in Sharepoint development?

When I have to use KeywordSearchQuery, when should I use FullTextSearchQuery and when should I use Query in developing the search part in Visual Studio for a Sharepoint site?
I want to search information from Contact list. If any keyword is put in the search box, I wan related information in our own specified format. Which technique should I use?
I think it depends on the situation. In your case, since you are searching a Contacts list, I would recommend using a regular CAML and SPQuery.
In general:
One list, use a CAML query
Many lists, use search

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