search

Parsing AND, OR query to formulate sql

I'm developping a mini search engine, and I want to implement the feature of searches based on logic operators AND OR... I'm having a difficulty on parsing a query containing AND, OR, NOT... especially when it comes to parentheses... (cat or dog) not (bike not mike) For simple AND, and OR queries, it's obviously too simple and I figure...

Some Q regarding SOLR and how it actually works!

I have a classifieds website, and I have currently around 100thousand ads in a mysql table. I am using php to fetch results and to display them on a page. However, I am noticing the searches getting slower and slower. That is why I am planning on installing and using SOLR, as I have heard good things about it. But to my suprise, I have...

Rails Search Across Multiple Models

Hi I have an issue. I have a show view that acts as a dashboard and brings in records from other models and then models associated to that. I have a simple search form that is working fine to search through one model, but I don't know how to have it look through its associated models as well. I don't think a full text search is necessary...

Can Google be used for site search on a database backed website?

I'm developing a web site with Google App Engine, and I want to have a search feature for user submitted stuff. Since this project is just a toy and I don't control the server, I'd like to just use Google to handle search. However, since the content is stored in the database, I don't think Google can discover the dynamic urls. Unless may...

Some problems searching mysql database via php

So I have this website that has a search feature which searches a table in my mysql database. The database at the moment has 1108 rows. It contains music info such as Artist and Album. Since its possible for every character to be in an artist name or album name, I've urlencoded each of those variables before being added to the database. ...

Searching List<Items> then change to List<ItemTypeA : Item>

Hi, I have this code and i need to be able to search through different lists of HierarchyItems and return a list of the correct type i.e. Hierarchy h = new Hierarchy(); //add a load of items of HierarchyItemA type; List<HierarchyItemA> results = h.Search("text"); CODE: public class Hierarchy { private List<HierarchyItem> items;...

I am building a search engine. How do I remove duplicates from search results?

When I search for something, I get content that have the same text and title. Of course, there is always an original (where others copy/leech from) If you have expertise in search and crawling...how do you recommend that I remove these duplicates? (in a very feasible and efficient mannter) ...

MySQL Fulltext keyword order?

I am making a little search algorithm at the moment, and I am wondering if MySQL fulltext searches weight keywords in order of appearance? For example: Search Term: php macaroni pizza custard In a fulltext search, is PHP more "relevant" than custard? Or are they both equal? ...

PHP: How do I search an array for all entries of a specific key and return value?

I've got a multidimentional array such as: $array = array( array('test'=>23, 'one'=>'etc' , 'blah'=>'blah'), array('test'=>123, 'one'=>'etc' , 'blah'=>'blah'), array('test'=>33, 'one'=>'etc' , 'blah'=>'blah'), ); How to I search the array for all the keys 'test' and get the value? I wish to add all of the values of 'test' found ...

PHP: get current array key?

$array = ( array('1231415'=>array('foo'=>'bar', 'test'=> 1)), array('32434'=>array('foo'=>'bar', 'test'=> '0')), array('123244'=>array('foo'=>'bar', 'test'=> 0)), array('193928'=>array('foo'=>'bar', 'test'=> 1)) ); I have an array that has (many) random keys, the ID number. I need to test each array within if 'test' = ...

Which Search / Tag system is better?

I am working on a website that has users and user-generated articles, galleries and video's. I am trying to make a tagging system and a search for them all. At first I was thinking in tbl_articles, tbl_galleries and tbl_videos I would have a title, description and a tags field. Then run a query like the following for each: select * fro...

Can anyone work out a more optimised SQL solution?

I am worried this is a bit expensive. Plus I will soon implement a normalized system for the tags so there will be additional joins. On top of that I have 4 tables (tbl_videos, tbl_articles, tbl_galleries and tbl_users) of which I want to display three results of each and thus will have to run the query four times on one press of 'se...

Hibernate search API with 2 tables

Hello I am trying to make a query with Hibernate criteria API. It looks simple but I can't get it to work. I have 2 tables. Person and Roles. Person has a set of roles. Role doesn't have any reference to Person. (i.e a guy A can be admin, user, another girl B can be only admin, etc...) I just want to to search for everyone who is doing ...

mysql - return results grouped in a column

I am working on a search/tag system. My original query I wrote was for when I was storing 'title', 'description' and a comma seperated 'tags' column in my article/video table. I have since realised the advantage of normalising my tags. I now have three table to deal with... tbl_Articles article_id title description content tbl_tag_i...

Google server forms authentication

I've setup forms authentication in my Google Search Appliance. Is there a way to have the title and a summary come back for protected pages? Currently, since they are all redirected to the login page, all search results are titled as "Login." I'm using asp.net with the .net framework 3.5. ...

Rails: Searching by Category without FullText

Lets say I do not want to get the VPS or Dedicated Server required to run constant indexing like with Thinking_Sphinx plugin or many of the other full text search plugins for ruby on rails. I have a bunch of listings in the database with a Name field and category field (among other things). It it possible search for a name in a certain...

Modal functionality dissapear after "find" or "reset" clicked

Hi guys. I'm having an issue with modal search. Modal pop up shows ok, but after "reset" or "find" is clicked the modal functionality disspear and although search box remains active you can click into jqGrid. Don't know if is a problem with the overlay. Ideas? jQuery("#listNoticias").jqGrid({ url: '<%= Url.Action("ObtenerDa...

Search and delete multiple lines

In vim :g/George Bush/d deletes all lines with George Bush. What if I wanted to delete 5 lines below that start with George Bush? Another realistic example would be to find all DEBUG in a log4net log and delete up to the end of stack trace (which I know will be another 10 lines below it) ...

Android: callback for search widget opened and dismissed

I have a screen layout that is forced to be potrait mode. Because it is very complex I don't have the time right now to invest creating a separate one for landscape mode. It also doesn't make much sense for my type of application. However, for input fields it's better to provide a landscape mode, because some phones have a hardware keyb...

javascript code to implement incremental search

i want when user type a word in text box then all the words starting from that word shold be populated and we can select one of them ...