Hibernate Search 6 More Like This - hibernate-search

I see that HS5 has the MLT feature. I have a HS6 project for which I need to use MLT. HS6 documentation has no mention of More Like This. The Changelog doesn't indicate it was dropped.
Any pointers will be useful.

The "More Like This" feature hasn't been re-implemented in Hibernate Search 6 yet. I'll add a mention in the migration guide.
In the meantime, if you are using the Elasticsearch backend, you can write a native predicate using JSON targeting the Elasticsearch's "More Like This" query. I've heard it's not exactly the same, but I haven't had time to explore it yet. It might fit your use case.
If you want to see this feature again in Hibernate Search 6, including in the Lucene backend, you can get involved here: HSEARCH-3272.

Related

Building separate theme for separate urls for Readthedocs

I'm looking for a solution that would allow us to have separate themes in the built docs through rtd, based on urls. The project is github-hosted, so we're using the Webhook integration there for rtd.
Basically, we'd like to have slug.readthedocs.io use a default, and have a custom domain through rtd, i.e. docs.ourdomain.org, use a theme styled to match our site.
on_rtd, it seems, is True whenever rtd builds the docs, so that's likely not useful, but please correct me if I'm wrong.
Perhaps multiple Webhooks? Some sphinx magic I haven't discovered yet?
Considering using branches or tags, but that just seems a bit much, and would, I believe, call for multiple project-naming on rtd. Though, again, please correct me if I'm wrong.
At the moment, we've implemented our site theming, and simply let that be in place for both, but ideally, we hope to have the slug.readthedocs.io site be more generic and in-line with the readthedocs.io feel.
At the moment, Read the Docs doesn't support multiple themes for a given repo/branch.
There are at least a couple of approaches available here.
1) Use branches to host alternative docs. Read The Docs has an example project illustrating this approach here:
Read the Docs Sphinx Theme Examples
-- [Github Repository]
2) Use sub-projects.
Neither of these really addresses the use case in my question directly, but they do offer a sort alternative approach to multiple themes.

How to implement full text search in NoSQL database?

Has anyone tried to deploy NoSQL database with Full Text Search feature?
I read a lot of topics here in StackOverFlow and some other sites but they were all in 2011 and 2012 which I think there are a lot of updates to this moment.
I have a project that requires a full text search feature and I am trying to pick the right NoSQL database.
I am thinking also of ElasticSearch and Solr to enable this feature?
Is MongoDB Full Text Search Feature working fine? or it has performance and scalability issues?
Thanks,
Elasticsearch is working pretty good. You can use analyzers to stem your text. Also you can store your data in JSON format. It has "match_phrase" function allowing you to make full text search in a field that you want to search. Take a look at that.You can find documentations here : https://www.elastic.co/guide/en/elasticsearch/reference/current/search-search.html
The MongoDb full text search feature works well from version 2.6, however, its full text search feature relies on a text index and you can only add one such index per collection. Depending on your exact requirements, this may be too limiting. Check the MongoDB documentation for more details. If you need a more flexible full text search functionality, Elasticsearch will be a better option.

Joomla 1.5 REST interface?

I want to query some information about articles or users from a Joomla website for my client-side application.
SOP can be ignored. I am working with Joomla 1.5.26 and I have an account with full rights. Unfortunately, I cannot access the source code at the moment.
For example:
http://example.com/index.php?option=com_content&Itemid=53
I would like something like this, but this returns full html page, not the article information.
And what if I would like to get many items at once sorted by some attribute like:
http://example.com/index.php?option=com_content&count=10&sortBy=latest&format=xml
Would like to see something like:
<articles>
<article>...<article>
<article>...<article>
<article>...<article>
</articles>
I haven't found a good explanation of the default query schemes.
Worst case scenario would be parsing the html, but I really hope there is some other way.
Any ideas?
Important: Joomla 1.5 and 2.5 are not longer maintained. Please upgrade to a stable and safe release.
But if you really insist, you can use "tmpl=component" as paremeter or just the index2.php to get the component content only (without template).
Everything else you will find under https://docs.joomla.org/How_to_override_the_output_from_the_Joomla!_core

Some questions before choosing/start learning Yii framework

I've been developing simple PHP/MySQL web sites for some years.
Never used a PHP Framework before and I understand I'll need to know OOP, no problem.
I'm about to start a SaaS project of my own.
A)
So far, I've seen Yii generates the CRUD and pages according to the DB.
Is it easy to modify the generated code?, like, adding a new DB field and its form field without not generating again all the stuff every time I change something in the DB and losing other customizations?
I mean, I'm 100% sure the generated DB code and pages are not going to be enough and I'll be constantly adding and correcting fields, and adding more tables etc.
B )
My project will include a Shopping Cart and Calendar(for events, tasks, etc.).
Does Yii has these options or at least an easy way to implement it like the Authentication options or Database listing, etc.?
C) Does documentation has this explained as a tutorial/book or is more like a reference(minimum explanation that only advanced user understand how to integrate it)?
thank you very much
Yiiframework has excelent documentation (you can start from here). Also there is an extensions area in the downloads section where you can find all available yii extensions.
All your questions can be answered if you follow their easy tutorial.
A) Yes, it's easy. You will just add code for new fields not changing it all.
B and C are answered by Stratosgear very well.
Is it easy to modify the generated code?
Yes it is. If you later decide to add more fields to the table, you can do that from your Phpmyadmin using sql commands.
You also need to edit the generated class file adding those new fields to correspond with that on your table.

Google like autosuggest with Solr

I'm currently using Solr with Terms Component and Jquery Autosuggest which works quiet good. However, this construct is limited to one autosuggest word (it autocompletes only the first word). Is it possible to implement a Google like autosuggest with multiple words/terms so i can autocomplete multiple words?
I just wrote a blog post about different ways to make auto complete suggestions with Solr. It's basically a comparison of some different strategies, check it out, it might help.
If you want to make multiple terms suggestions, it turns out you should use, as already mentioned in the other answer you got, the Suggester component available in Solr starting from the 3.1 version. Since it has some limitations, you can also have a look at the ShingleFilterFactory, which generates token NGrams. It creates combination of tokens as a single token, that's useful to suggest multiple words.
You can also use SpellCheckComponent for better auto complete suggests.
See http://wiki.apache.org/solr/Suggester for details.
Edit:
Refer here for solr5 and above
Check this out, it might help
http://www.lucidimagination.com/blog/2009/09/08/auto-suggest-from-popular-queries-using-edgengrams/
I worked out the same task, finally got solved using TermsComponent with multiple fields. check this link. http://lucene.472066.n3.nabble.com/auto-completion-search-with-solr-using-NGrams-in-SOLR-td3998559i20.html