search

How can I add search functionality into my PHP website?

Duplicate: How would I implement a simple site search with php and mySQL? I want to insert a search functionality into an existing website. The site is database driven. What is the best way to achieve this? Should i just simply go ahead with the query select * from tables where field like user input? Is there a better way to index the ...

Running Thinking Sphinx in two applications under passenger

I have two different rails applications running thinking_shpinx, and one seems to not be using the correct index. I tried setting the port in the sphinx.yml but it seems to not have any effect. ...

Searching NTFS directory .NET

I would like to write a web page where users can search a directory on NTFS for certain criteria and display the results. Does the directory have to be indexed? Is there a .NET accessible windows search API that I can use to query the directory? ...

Best way to search for a saturation value in a sorted list

A question from Math Battle. This particular question was also asked to me in one of my job interviews. " A monkey has two coconuts. It is fooling around by throwing coconut down from the balconies of M-storey building. The monkey wants to know the lowest floor when coconut is broken. What is the minimal number of attempts needed to est...

Finding alphabetical position in a large list

I have an as400 table containing roughly 1 million rows of full names / company names which I would like to convert to use another datastore while still matching the speed of the original. Currently, a user enters the search and almost instantaneously gets the alphabetical position of the search term in the table and and a page of mat...

Searching a database of coordinate-bound data for an arbitrary polygonal area

I have a relational database where each entry is marked as a dot with latitude/longitude coordinates. I give the user the ability to mark an arbitrary polygon on a map, and want to return all entries that are within the polygonal shape. What would be the best way to achieve this? Also, it might be worth to point out that small errors ...

Visual Studio: Is there an incremental search for the entire solution?

I am very fond of the keyboard shortcuts built into Visual Studio. One of my favorites is Ctrl+i, which triggers the incremental search. It jumps over the text in the current document as I fill in the searchword. After the desired searchword is typed, I use F3 to jump through the matches. It works fine, except that is is limited to sear...

Best way to Search

I am building a real estate website. I have a table for properties (i.e. "houses"), a table for pictures, a table for features, etc. So each property's data comes from three, not only one table. I need to provide a function that retrieves requested property data depending on a search criteria, for example: property of the week feature...

How can I search for a value in an object?

I have a PHP script that goes through an XML file, but I want to be able to search the object for a value, just like I can search an array for a value. According to comments on PHP.net, array_search() supports objects as of PHP5, but I can't get it to work. The XML file is a list for bus stops, and I want to be able to search through t...

Problem searching a NSMutableArray

Basically, I have a UISearchBar searching an NSMutableArray of stories that make up an RSS feed, and when you select a story, it loads in my app's UIWebView. It's difficult to explain, but I have a list of entries 1, 2, 3, and 4 and you search for '4'. 4 will be the first entry in the now-filtered list of data, right? You'd think that by...

radio button assignment as a search filter

Template: <form method="POST" action="/Bycategory/"> <input type="radio" name="andor1" value=1 checked> <input type="radio" name="andor1" value=2> <select id="pathology_id" name="pathology_id"> {% for pathology in pathology_list %} <option value="{{ pathology.id }}">{{ pathology.pathology }}</option> {% endfor %} </selec...

Searching multiple tables with MySQL

I am writing a PHP/MySQL program and I would like to know how to search across multiple tables using MySQL. Basically, I have a search box as in the top right of most sites, and when user's search something in that box, it needs to search in users.username, users.profile_text, uploads.title, uploads.description, sets.description and com...

Search PL/SQL Code

SELECT * from ALL_OBJECTS returns the names of various procedures/packages/tables/other db objects. I want to look inside the PL/SQL code for a matching string. How do I do this? Something like: (pseudocode) SELECT * FROM all_code WHERE line_of_code like '%mytext%' ...

Sphinx: What is the best way to approximate string sorting with multiple indexes?

I am working with Sphinx and would like to implement string sorting. I understand that this can be accomplished using attributes and String Ordinals, however, I also want to implement Live Index Updates and string ordinals do not work with multiple indexes. What would be the best way to approximate string sorting with multiple indexes?...

How to correctly boost results in Solr Dismax query

I have managed to build an index in Solr which I can search on keyword, produce facets, query facets etc. This is all working great. I have implemented my search using a dismax query so it searches predetermined fields. However, my results are coming back sorted by score which appears to be calculated by keyword relevancy only. I would ...

using OR and NOT in solr query

I'm working on a solr query similar to the following: ((myField:superneat AND myOtherField:somethingElse) OR NOT myField:superneat) When running this, no results are returned. Using criteria on either side of the OR NOT returns results that I'd expect - they are just not working well together. In the case that myField matches supern...

Implementation of Levenshtein distance for mysql/fuzzy search?

I would like to be able to search a table as follows for smith as get everything that it within 1 variance. Data: O'Brien Smithe Dolan Smuth Wong Smoth Gunther Smiht I have looked into using Levenshtein distance does anyone know how to implement this with it? ...

Custom Paging on GridView Populated by Button Press

I've got a Gridview that's populated by a Search button and I'm not sure how to go about doing custom paging for it. I run the search query using sp_executeSQL right now and it returns the entire resultset. I'd like to know what steps I should take to set up custom paging and sorting on the GridView and the most efficient way to modify ...

Display vs. Search vs. Sort strings in a database

Let's say I've got a database full of music artists. Consider the following artists: The Beatles - "The" is officially part of the name, but we don't want to sort it with the "T"s if we are alphabetizing. We can't easily store it as "Beatles, The" because then we can't search for it properly. Beyoncé - We need to allow the user to be...

Advanced Search option Programatically Sharepoint Search

I am using object code model to retrieve search result from sharepoint search..Can any one suggest how do i put advanced search option for my search.Do object code model has the feature to perform advanced search. ...