search

Does Solr have an equivalent of “strict order operator” that Sphinx has?

别来无恙 提交于 2019-12-25 01:16:25
问题 I'm choosing between Solr and Sphinx. Sphinx doc page has a section called "5.3. Extended query syntax" which describes the following search parameters (among others) : strict order operator (example: aaa << bbb << ccc) - NEAR, generalized proximity operator (example: hello NEAR/3 world NEAR/4 "my test") - search according to distance between words SENTENCE/PARAGRAPH (example: "Bill Gates" PARAGRAPH "Steve Jobs") - search inside a sentence/paragraph Does Solr have any similar functionality?

Elastic search exact field value retrieval

雨燕双飞 提交于 2019-12-25 01:14:37
问题 Now I bumped into other problem - how can I choose only the values of the field which fit fuzzy query? Let's say there are different names in the field university like: education : [MIT, Stanford University, Michingan university] but I want to select only stanford university. Let's say I can do aggregation on each fuzzy query, which would return ALL counts and all names of universities from field education. What I need - to get aggregations only of exact values which match fuzzy query. Let's

Elasticsearch - range filter with multimatch?

旧巷老猫 提交于 2019-12-25 00:49:04
问题 I'm using elastic search to filter outfits: def self.search(query) __elasticsearch__.search( { query: { function_score: { query: { multi_match: { query: query, fields: ['description^30','material^10'] }, }, field_value_factor: { field: "purchased" }, } } } ) end The problem is I can't seem to filter them by how many times they were purchased like this: range: { purchased: { gte: 1000 } } Wherever I put this, it gives me the following error: [400] {"error":{"root_cause":[{"type":"parsing

Searchbox for Custom Listview

会有一股神秘感。 提交于 2019-12-25 00:45:16
问题 I build a coustom listview, wich filled with data from SQLite. Now I want for my listview a search box like this: https://lh5.googleusercontent.com/-0H2RUBsLIYQ/Th1lqLCn5iI/AAAAAAAAALg/QZe8a5-PYu0/custom_listview_search2.png> This is my activity: package de.bodprod.rettinfo; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import android.app.Activity; import android.os.AsyncTask; import android.os.Bundle; import android.view.View; import android.widget.AdapterView;

how to search for matching items in an object list?

二次信任 提交于 2019-12-25 00:36:14
问题 Hi i have a class like this.. class man { public string name { get; set; } public string houseid { get; set; } } and I have a list of man like this.. List<man> ppl = new List<man>(); I want to search if there are more than one person with the same houseid. If there are more than one man with same house id and if the number of people having same house id does not exceed limit 5 I want that house ids and the number of occurrences of that house id? Simply if there are houses with less than 5

JavaScript find names in strings

﹥>﹥吖頭↗ 提交于 2019-12-25 00:17:46
问题 What's a good JavaScript library for searching a given string for a large list of names. For example, given a list of 1000 politicians names find every instance in a string and wrap it in a span . Priorities are performance with a growing list of names, and accuracy in determining difference between eg, "Tony Blair", "Tony Blair III". For example, this: ["Tony Blair", "Margaret Thatcher", "Tony Blairite", "Tony Blair III", etc...] "The best PM after Tony Blair was Margaret Thatcher." Becomes:

search for text in a cell of dataGridView and highlight the row?

戏子无情 提交于 2019-12-25 00:06:05
问题 Im trying to implement a search function for when the user enters text in a textbox (tbPartNum) and then clicks the "Find" button it then searches the cells in dataGridView1 and once its found it, it highlights the entire row yellow. My code is as follows which obviously doesnt work it throws an error which states "NullReferenceException was unhandled" and underneath it "Object reference not set to an instance of an object." using System; using System.Collections.Generic; using System

How can I fix this element to stick at the top of the page on scroll?

£可爱£侵袭症+ 提交于 2019-12-24 23:25:33
问题 I'm working on a project for my UI design class and need help fixing an element to the top of a page on scroll. Here's what I have so far: http://ieatthings.com/opinio/query.html As you scroll, the search bar should move up, over the navbar, and fit nicely into place to let the user search while in the middle of a page. But the problem is that the search bar keeps going up! I used the Javascript from this tutorial: Fix object to top of browser window when scrolling. I have tried all kinds of

jquery: ajax based search - browser crash?

倾然丶 夕夏残阳落幕 提交于 2019-12-24 22:18:54
问题 hey guys, i'm working on a rather weird ajax based search model. The search is not actually retrieving real searchresults from the server but rather loads the website's sitemap (with the jquery load() method) and extracts its links. That works actually really good, but there is one little bug that might cause my browser to crash. var searchTimer = 0; $('.s').keyup(function(e) { switch (e.keyCode) { //case 8: // Backspace case 9: // Tab case 13: // Enter doSearch(e.keyCode); break; case 16: //

Search with two fields not mandatory

落爺英雄遲暮 提交于 2019-12-24 21:57:58
问题 I'd like to do a search function in my website. This research will show products based on product's name and seller's location. My view : <?php echo $this->Form->create('Product', array('type' => 'GET')); ?> <div class="col col-sm-4"> <?php echo $this->Form->input('search', array('label' => false, 'div' => false, 'class' => 'form-control', 'autocomplete' => 'off', 'value' => $search)); ?> </div> <div class="col col-sm-2"> <?php echo $this->Form->input('searchCity', array('label' => false,