Search Engine Help - search-engine

I have a mediawiki installation that I've customized with some of my own extensions. Here is the basic platform, pretty standard LAMP install.
Ubuntu Server
Apache 2
Mediawiki 1.15
PHP 5.2.6
MySQL 5.0.67
For the actual MW search I use Lucene (EzMwLucene). I also have custom extension that displays tabular data from a separate database within a MW page. Lucene doesn't index this info (which, in my case is actually good because it would clutter your expected search results). For this installation I didn't do anything to Lucene other than install it and wouldn't know how to customize it for my needs and it may be "too powerful".
At any rate, I need to create a search for the data in my other database. I have a master table that is updated daily based on data stored in other (normalized) tables. At the moment it is one of these searches that basically creates a SQL query based on the criteria you enter. This is a lot of work, though. I would like it to be more of a "type and submit" type search.
I don't think I need a comprehensive "cut & paste" type answer, but if anybody has something that I can google I would be very appreciative. I don't need to recreate the wheel, which is what I would be doing if I followed what I see in google.
If you would like to see my master database, let me know, I would want to sanitize it to make me more anonymous (whatever that means). Also, if you're familiar with MW and would like to see any of my extension code, again, let me know.
TL;DR: need to make a custom search feature with LAMP (displayed in Mediawiki). Any guidance appreciated.
Thanks SO!

Why do you need to add custom search? This will relate to the best answer.
For simplicity, you could use the Google Search Engine - http://www.mediawiki.org/wiki/Extension:Google_Custom_Search_Engine
Otherwise it sounds like you need to write a full-text query for the database.

Related

Custom Report Printing in Oracle Apex

What is the best way to create a Custom Report Template to print in Oracle Apex ? I saw some posts that've already been answered, but since they were Apex 5.1, I was wondering if these were still up to date, or if there are easier way no (I am using Apex v21.1). Also, the "Printing" attribute in the Reports does not give me the possiblities to do these specific things :
I would like the users to print an Interactive Report, which will display the logo of the company, the export date, and the data obviously. Is it possible to set custom margin so the list take more space on the page, and to set a custom size for the column, in case I have a column with a long text in it ?
Thanks in advance,
Thomas
Welcome to one of the weakest points of Oracle APEX, printing.
Honestly, the best option is Apex Office Print(AOP), but they are a paid plugin.
They enable lots of different printing, quite easy to grasp, and I am quite satisfied with them.
Other options I have seen are:
Make an excel sheet from within the database and you can generate that dynamically(you can also expand fields, colour them, probably can also put an image in there but I havent tried that).
I once decided to torture myself and I tried printing through HTML, as in I created an HTML document with the data I wanted(I made an invoice), but that has many problems, chief among them being page breaks.
Another option that was recommended to me, but that I have not yet tried was setting up an Apache FOP, having the Oracle database generate an XML, send it there and get back a nice looking pdf(http://www.apex-reports.com/videos.html).
I hope you get something working, and if you try this Apache FOP approach please let me know how it goes.

Best solution for clickable search list in Rails

I'm developing an app in Rails with a nutrient database. Now I'm looking for an easy solution for users to search the database through a search field, which as they type will present a list of records from the database, which at the same time are clickable and once clicked will direct them directly to the show path of that nutrient.
I'm thinking of something like this. If you enter e. g. "burger" it does exactly what I need.
I've been researching now for some days and found solutions from jQuery autocomplete to Elasticsearch to typeahead.js but now I'm totally lost, which solution would be the right one for my usecase (I tried jQuery autocomplete but at the end it turned out that this is not exactly what I need).
Anybody some ideas?
Thanks.
Algolia is a well known solution for instant search, but not the easiest one to implement (though their support team is incredible).
You should look into searchkick which is based on elasticsearch, and has an instant search feature.
It is relatively easy to implement, and pretty well documented.

Advice with Full Text Search Engine in Rails

I am trying to add to my website a search bar like the one on Facebook. I want my users to be able to search through my products, my other users ... But I also want the result to be displayed in real time without pressing a button. I am currently looking at several options (thinking-sphinx, ferret, ...) but I am not sure which one to use and that's why I would like to get advices from pros ;)
So my requirement are :
Result to be displayed in real-time in a box on the current page.
Css Customizable
Be able to search through severals table in my PostGreSQL DB.
I am currently using Heroku for production.
I want to choose the best one for my needs and that's why I am asking your opinion.
Thanks in advance !
Make sure to separate how you want data displayed (your first two requirements) from how you want it indexed (third) from how you want to deploy.
Let's start backwards. Heroku provides limited support for machine configuration; both options you mention require installation of a service that reads and writes files. Heroku has such an option in two ways: 1) PostgreSQL has a built-in full-text search capability, and 2) Heroku has made Flying Sphinx an option, as well as these other options documented on the Heroku site. The first two options may provide the easiest linkage to your database, but I haven't tried other options, so it's possible they do too. So now you have a search index, deployed.
Real-time "incremental" search is purely a matter of presentation ... and maybe performance. Start typing and you start getting results is nothing more than sending requests via AJAX to the search server, typically after a short delay in typing (maybe 50ms), and handling the display of results. There are a couple of ways to make that simple written up here in this SO answer.
I ended up keeping the PostgreSQL engine for now but used select2 as the jquery for the presentation and was able to get a facebook like search box :
Select2 with Rails and JSON
Thanks for you help !

How best to aggregate site statistics (especially search demand)

I am working on a rails application that uses sunspot solr for search. I have been asked to log (or capture in some way) each search that happens on the site; the query, the user that did the search, the result count that resulted from their search...etc, so that the company can report on what people are searching on (demand), and other things.
Before I go and make a table, that will receive an ever-growing number of rows of search data, I'm wondering if anyone has done this in a better way? Can I use analytics (google?) in some way for this? Is there some kind of service I can send this information too, such that we could easily pull reports, or create reports from?
In short, is there some better/smarter way than creating my own table and storing this all in our own DB?
I had never done this, but here are some thoughts.
If you just need to store that data I think you should do it yourself.
If you need to also provide a way to analyse the data yes, see if there is anything already done (I'm not sure but it seems google analytics only support internal search using their search bar).
If your client already have some BI tool they just need a way to access the data, and it would be easier to have it in a owned DB wich you can easily be query instead of using a provider api.

Full Text Search with Firebird and Delphi

I'm looking into implementing full text search on our Firebird database. Our requirements are:
Every field in several tables should be indexed. When a result is found we should be able to find out the originating table.
The index can be stored in the database or in the file system.
The results of the search (BigInt primary keys) must be used to join with the original records in the database to display the records in a table.
Can anybody recommend a decent way to achieve what we need? I've looked at somehow integrating DotLucence into Delphi, but can't really find very much information on how to go about it.
Here are a few resources for you to consider:
Sphinx very powerful and popular free open source full-text search engine.
Textolution Fulltext search for Interbase and Firebird.
IBObjects Full Text Search ("Fuzzy Search") module, a fully working module that can be used to set up your search indexes or as a model for your own custom implementation.
Rubicon is a Delphi add-on that lets you put full text search capabilities into your applications.
Fulltext Search for Firebird SQL By Dan Letecky on CodeProject using DotLucene full-text search engine.
Mutis is a Delphi port of the Lucene Search Engine. Provide a flexible API for index, catalog and search text-based information with great performance. Excelent for implement custom search engines, researching, text retrieval, data mining and more.
There is a fork of Firebird code made by a company called Red Soft. It's licensed under the same license as Firebird, so you can take a look at their version which can support full-text searches using Lucene engine via JavaVM interfaces.
You can also read a paper titled "Full text search in Firebird without a full text search engine" by Bjoern Reimer and Dirk Baumeister, presented at 4th Firebird Conference.
I think you will have a problem with requirement 2: The index can be stored in the database or in the file system. Most indexing services create their own index file which stores data in a highly optimized way. If you really want it, maybe it is possible to load and save an index to a single blob field but I don't really see a reason for this.

Resources