Datastax Enterprise v 4.8.4 and Solr numCount - datastax-enterprise

Using Datastax enterprise 4.8.4 - I'm trying to do a simple pagination based on the indexed records that are successfully indexed into Solr. The problem I have is that to do this simple pagination (without deep pagination as results are typically < 1000) - I used the numCount to prepare a JSON response with the available results found. Using the native datastax drivers (e.g. without using Solr-HTTP) - I could not find an example of how to fetch numCount from a Solr query. Is fetching numCount even possible from Datastax?
Thanks

In 4.8 versions Solr numFound is only reachable via a SELECT count(*) ... FROM ... WHERE solr_query=...
Solr numFound support will be improved in the future though.

Related

Twitter datasets for Neo4j?

I'm looking for example Twitter datasets (not patterns, articles or blogposts) for use with Neo4j. The Neo4j website lists "Twitter Connections Heroku Waza 2013", but it no longer appears to be accessible.
Going to go ahead and add my comments as an answer:
Get the zip here: https://dl.dropboxusercontent.com/u/94782892/tweets.zip
This is a small database (neo4j version 2.1.1) of tweets of the following structure:

Does neo4j have all the proper apis and support for all the mentioned drivers?

I used Node js for my webapp and I wanted to create a new user with unique email ID and hence that required me to look up the index table but then I realised that the Node Driver doesn't have the index() function as the one in Java( graphDb.index() ). Any work around for such an issue, like using REST or some Cypher connetor
Neo4j just so happens to have a wonderful REST API that should work for your application. The docs for the api are detailed here:
http://docs.neo4j.org/chunked/milestone/rest-api.html.
It even has an entire section devoted to indexing.

Get the related search queries using sunspot solr

My rails application using sunspot solr to search the books/authors. Now If I give search query as
"Jeffrey Archer"
it ll give the set of books which has "jeffrey archer" as author. But If I give
"Jefrey Archer"
sunspot doesn't return any results. So that time I want to show
did you mean? "jeffrey archer"
How to implement this using sunpspot solr ?
Spellcheck integration into Sunspot is experimental: https://github.com/sunspot/sunspot/tree/spellcheck
I have not been very satisfied with the results that I've been able to achieve with spellcheck in Solr 1.4 and 3.x. However, with the release of Solr 4.0 and its improved spellcheck functionality, it's something that's due to be revisited.
You can try the branch I've linked, alternately you may want to use RSolr directly to execute your own spellcheck requests directly.
Pull requests welcome!
Solr provides a Spell Check Component using which you can provide Spell correction to the user based on the terms in your index.
Sunspot is just a CLient, so you just need to check how you configure Spell Check Component.

Rails + SQLite3: Search?

I'm currently building an e-commerce website that's going to be backed by a SQLite3 database. I'm looking for a way to do an in-browser search, with the results being links to products that match the search query. I've got no idea where to start. Any suggestions?
Why? If you have enough products that you need search, use a database that will grow with you. SQLite is more for development and small/low-traffic applications. For example, Google Chrome uses it to store your history.
For very basic search, SQL-based finding is okay. You can do
SELECT * FROM foo WHERE bar LIKE "%query%" LIMIT 10;
…fairly easily, and relatively quickly (especially since you're using an index on that column, right?).
For more advanced or high-performance search with conditions, partial matches and searching across tables, you can use SOLR or another third-party search-specific application.

Search Engine Help

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.

Resources