solr strfield with haystack django - django-haystack

For one of my fields, I require solr.StrField but it doesn't seem to be supported by Haystack. Is there a way i can create schema.xml with ./manage.py build_solr_schema with the strfield included?

Don't know about haystack, but you could always edit your existing schema.xml instead of relying on a tool to create it for you.

Related

Case insensitive search in Crafer CMS with elasticsearch?

I wanted to implement auto-completion with type head, following this documentation, I was able to achieve that. But the search was case sensitive.
Following this documentation, it says, to enable case insensitive search I should select Tokenize for indexing option, this way.
I am using crafter CMS 3.1.0 version and I don't use any Tokenize for indexing option;
Note: The version used in documentation is 3.1.9, is this feature not available in 3.1.0?
the feature should work in 3.1.0 too. Keep in mind that after you enable the "Tokenize for indexing" option you will need to reindex all existing content and change your query to use the new field with the _t postfix.

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

Adding a LIKE Finder on a Localized column in Liferay Service Builder

I have a column that have been set to Localized="true", is there a way to add a finder that only matches LIKE on specific locale?
Unfortunately, I don't think it would be possible: localized columns are stored as xml strings in db, and I haven't found any example of a search like this in Liferay source. Have you considered using the index? It would be way easier to do a LIKE query for a localized field.
You can use xPath (if you use a db engine that supports it, for example postgresql)

Can Drupal's search module search for a substring? (Partial Search)

Drupal's core search module, only searches for keywords, e.g. "sandwich". Can I make it search with a substring e.g. "sandw" and return my sandwich-results?
Maybe there is a plugin that does that?
The most direct module for it is probably Fuzzy Search. I have not tried it. If you have more advanced search needs on a small to medium sized site, Search Lucene API is a fine solution. For a larger site, or truly advanced needs, Solr is the premiere solution.
Recently I made a patch for Drupal's core search module to provide it with partial search (aka n-gram searches) ability. This is tested against Drupal 6.15 & 6.16 releases. You might want to read about patching.
On the other hand you can make use of Apache Solr Search Integration, Search Lucene API modules or other 3rd-party search solutions which takes more time to implement.
PorterStemmer module has its own different story in which you might be interested, too.
Yes. Fuzzy Search (module) does it. https://drupal.org/project/fuzzysearch
Drupal Finder does it somehow, namely: it has an autosuggest feature, so if You start typich sand it should suggest You a node containing sandwich.

Drupal search - alternative ways of doing it?

3rd Drupal question in a day.. guess what I'm doing!
OK, I've got the default Drupal search block, but I really need to find a way of restricting it to just searching one particular content type which is called "recipes" (guess what that one contains!)
Does anyone have any ideas on how I can restrict the search and then go about controlling the output display?
Thanks!
You can use the Search config module. If this module does not your work you should also look at this page: http://www.drupalmodules.com. Just type in "search" and you can find a few search plugins with descriptions.
I recommend the Finder module, which works well with CCK and filters and is straightforward to theme.
You could be interested in trying Faceted Search, which add a series of blocs to filter the results returned by the search module. There are many other modules which are related (see Projects related with Faceted Search).

Resources