Google like autosuggest with Solr - autocomplete

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

Related

Create a Block with data from database in Sulu

I need to build a block with data from (Symfony) Entity.
For example a carousel with last 3 item/record from database.
This block can appear in more than just a page.
I know that I can use a custom controller but is that the best technical choice ?
Do i need "Smart content" ? Read the doc but it's not clear
How i can do that ?
Thanks in advance.
Using a twig extension or a controller would definitely be the easiest way, because no sulu knowledge is required for that.
But the sulu way of solving that problem would be a custom SmartContentDataProvider. There are two main advantages of this method:
The content editor can further filter the result (in your case probably sorting and limiting)
The result is also displayed in the admin interface (Otherwise it would just be shown in the preview)
Our community is usually using our Slack channel or GitHub Discussions for support questions. Your questions will probably be answered a lot faster there, because there we can better track them.

How to search on GitHub with OR/AND operators

How can I search an issue on GitHub that contains keywords "java" AND ("python" OR "C++")? Is it possible to represent a search with these logical operators like OR/AND?
It turns out GitHub does not provide functions to achieve the searching logics like ANR/OR. The solution I figured out is to write a crawler that implements the searching logics.
Well, GitHub does not work like StackOverflow, but there are some ways to achieve what you want to accomplish. Start by using the type label, like this type:issue, then you can use the in qualifier, like this python in:title,body, which will search titles that contain the word python. Here is a more detailed (reference) of GitHub's Docs, which might help you with your issue.
I hope this helps you, but as much as I searched I could not find conditional search features on GitHub's search, but there are some pretty useful labels (qualifiers) that you can benefit from.

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.

Google Content Experiments for whole part of the site

I want to run an A/B-test or an experiment for whole part of the site. For example on my /blog/ page, where one variation would have a newsletter form and other variation a free ebook download button.
The problem is that I have to use a full URL path for the experiments, for example /blog/2013/article/1?var=1 and /blog/2013/article/1?var=2 With this method I would need create a new experiment for each blog post. This is impossible.
Any tips on how to approach this?
It's possible, but the documentation is lacking.
When you choose your variation URLs, you need to use relative instead of http://. This let's you use query parameters to define the variations, instead of the full URL. In your example, you would define your original page as:
http: //www.example.com/blog/2013/article/1
and your variation URLs would be ?var=1, var=2, etc. using relative as the option in the dropdown (instead of http:// or https://).
Here's the not-so-clear documentation on using relative URLs for your variations:
https://support.google.com/analytics/answer/2664470?hl=en&ref_topic=1745208
One important thing to remember is that if you're doing it this way, you need to include the content experiment code on every "original" page.
There's also another way to have even more control over serving the variation pages and controlling the experiment using the Content Experiments JavScript API. This is a relatively new feature - you can see the developer documentation about this here:
https://developers.google.com/analytics/devguides/collection/gajs/experiments
I am not sure this is possible. You might look at a more robust yet simple to use tool like Visual Website Optimizer or Optimizely.

How can I browse or query live MongoDB data?

I've googled around but couldn't find a working MongoDB viewer or data browser.
An ideal (for my needs) tool would be a web based viewer with dead simple features (browsing and doing queries).
You have :
Mongo3
futon4mongo
See: http://nosql.mypopescu.com/post/334469038/a-couple-of-nice-gui-tools-for-mongodb
Hopefully it'll be updated frequently when new tools are available!
EDIT:
Better overview: http://www.mongodb.org/display/DOCS/Admin+UIs
I just tried MongoVUE and it works like a charm!
Check it out: http://www.mongovue.com/
MongoHub is moved to a native mac version, please check http://github.com/bububa/MongoHub-Mac.
genghisapp is what you want.
It is a web-based GUI that is clean, light-weight, straight-forward, offers keyboard shortcuts, and works awesomely. It also supports GridFS.
Best of all, it's a single script!
To install it
$ gem install genghisapp bson_ext
(bson_ext is optional but will greatly improve the performance of the gui)
To run it (this will automatically open your web browser and navigate to the app as well)
genghisapp
To stop it
genghisapp --kill
https://github.com/Imaginea/mViewer
I have tried this one and as a viewer it's awesome with tree and document views.
Im just testing Rock_Mongo
It's a nice tool, written in PHP.
MogoVue is the best option I found so far, it has great features I did not see in other viewers, plus it gives few options to look at the data, as json, tables and hierarchy, which is extremely useful.
Avoid MongoExplorer, it has major issues, which can cause you huge headaches. When viewing records using this tools, it may change fields which are MongoId's to plane string, it does not give any indication on this, just does it when you focus on the id field, this bug cost me lots of time and effort trying to find "what and where in my code i'm doing this silly thing"...
RoboMongo
Genghis
And entire list from here http://docs.mongodb.org/ecosystem/tools/administration-interfaces/
While the built in Http Interface of MongoDB isn't exactly what you are asking for, but it is available and supports a REST interface to do simple queries, etc. This is built-in to the mongo instance with a default of port 28017.
Documentation: http://www.mongodb.org/display/DOCS/Http+Interface
As well as those mentioned by shingara, there's also:
Opricot
PHPMoAdmin
MongoHub (I've heard mixed reviews on this one, not sure if it's maintained)
Just pushed mongoclikker to GitHub. It's a dead simple MongoDB viewer written in Node.
There a lot of UIs on official mongo site http://www.mongodb.org/display/DOCS/Admin+UIs
To add to the list :)
I just made a simple Mongo browser based on a hierarchical JQueryTreeview and implemented in Sinatra and Ruby.
The reason for another viewer was that I wanted something that was fast and easy (both to use and the code base), that would let me peek at what was going on my MongoDB. Also, I wanted some nice Ajax effects. and could be the base of a more complete browser.
https://github.com/tomjoro/mongo_browser
I just released a simple web-based data viewer called Mongs. It isn't a server admin GUI, it's focused on data browsing, which sounds like what you're interested in. Mongs is implemented in Python using the Aspen web framework.
JMongo is nice db viewer using on fedora linux
I started work on small project: https://github.com/lucassus/mongo_browser
It's a mongodb browser based on ruby's sinatra framework.
here is the better tool for sql as well as No-Sql viewer and also you can query in gui mode with this tool.
"RoboMongo" is easy to use and cross platform, using on centos 6.2 but no option for data import/export which can be found in "umongo" but not easy to use as RoboMongo.
For web: genghis is simple and have much more fashion interface.
For desktop: robomongo: Shell-centric cross-platform MongoDB management tool
I'm using MongoDB Compass. You can download the community edition by entering valid information.
I using Robomongo, in version 0.8.3 implemented multiply inserting documents, for more details https://github.com/paralect/robomongo/issues/173. Robomongo also have builtin mongodb-shell may be usefully for your purposes.