search

lucene indexing of html files

a 夏天 提交于 2019-12-23 12:27:46
问题 Dear Users I am working on apache lucene for indexing and searching . I have to index html files stored on the local disc of computer . I have to make indexing on filename and contents of the html files . I am able to store the file names in the lucene index but not the html file contents which should index not only the data but the entire page consisting images link and url and how can i access the contents from those indexed files for indexing i am using the following code: File indexDir =

Angularjs: Search filter not working when name starting with ! (exclamation mark)

女生的网名这么多〃 提交于 2019-12-23 12:26:52
问题 I have list of states and I have added search filter on name of states. I have array like this: stateList : [{name: 'abc', area:500},{name: '!def', area:500}] I have <li> with ng-repeat="state in stateList | filter:{name:searchText}" Search text box with ng-model="searchText" Search is working in normal scenario but when I search !(exclamation mark). It is not giving any result. It should give state with name '!def' 回答1: The problem is that ! token is recognized by AngularJS as "negative

Search results not displaying for multiple word search in WordPress

与世无争的帅哥 提交于 2019-12-23 10:38:39
问题 I've customized a theme and am having some problems with search results using multiple-word queries. Site is live at www.abetterworldbydesign.com Searching for a single word works as expected. Searching for multiple words that should have returned results shows blank results. Code for searchform.php below. <form id="searchform" name="searchform" method="get" action="<?php echo home_url(); ?>"> <div> <input type="text" id="s" name="s" /> <input type="submit" id="searchsubmit" value="<?php esc

sed: can't read : No such file or directory

我的梦境 提交于 2019-12-23 10:09:27
问题 I am running the following command: find . -name '*.html' -exec sed "s/foo/bar/g" {} \; where the file structure looks like this: ./two/three.html ./two/two.html ./two/one.html ./three/three.html ./three/two.html ./three/one.html ./one/three.html ./one/two.html ./one/one.html However, sed comes back saying the files could not be found, even though these two commands work fine on their own (i.e. I can run a find by itself, and I can run sed by itself fine). I had a peer look at it with me, and

elasticsearch term query doesn't work

懵懂的女人 提交于 2019-12-23 09:37:22
问题 I have problem with the term query in elasticsearch. I send the following query: { "query": { "term": { "title":"Test1" } } } I have an empty result: { "took": 1, "timed_out": false, "_shards": { "total": 3, "successful": 3, "skipped": 0, "failed": 0 }, "hits": { "total": 0, "max_score": null, "hits": [] } } But if I send the following: { "query": { "term": { "root":true } } } I have: { "took": 3, "timed_out": false, "_shards": { "total": 3, "successful": 3, "skipped": 0, "failed": 0 }, "hits

Search form with Codeigniter

こ雲淡風輕ζ 提交于 2019-12-23 09:34:05
问题 I am trying to create a search form in Codeigniter. I want to give the user 4 different options to search from. For the result I want a table that displays all 11 columns in the table I am searching from. This is the code I have so far. Controller: public function index(){ $this->searchTest(); } public function searchTest(){ $this->load->model('reg_model'); $search_term = array( 'firstName' => $this->input->post('firstName'), 'lastName' => $this->input->post('lastName'), 'street' => $this-

Javascript efficient search array for value with jQuery

北城以北 提交于 2019-12-23 09:26:03
问题 There's a gap in my JavaScript knowledge here. I want to search an array of objects values for a particular value and return it. For the year I have been writing JavaScript, I have been implementing it like this: var itemClicked = (function(){ var retval; //Note self.inventory.itemsArray is an array of JS objects $(self.inventory.itemsArray).each(function(i){ if(parseInt(this.id) === parseInt(idOfItem)){ retval = this; return false; } }); return retval; })(); It works, but I'm sure as

Changing the default analyzer in ElasticSearch or LogStash

房东的猫 提交于 2019-12-23 09:15:02
问题 I've got data coming in from Logstash that's being analyzed in an overeager manner. Essentially, the field "OS X 10.8" would be broken into "OS" , "X" , and "10.8" . I know I could just change the mapping and re-index for existing data, but how would I change the default analyzer (either in ElasticSearch or LogStash) to avoid this problem in future data? Concrete Solution: I created a mapping for the type before I sent data to the new cluster for the first time. Solution from IRC: Create an

How to add a drop down next to the search input field in Android?

谁都会走 提交于 2019-12-23 08:28:23
问题 In the system-wide search on my HTC Desire (Froyo), I see a little drop down left to the search input field that allows to select where I want to search (All, web, apps). How can I implement this in an application of mine ? The search tutorial on the Google developer site does not address this. So in a scenario like the following, taken from the Android docs, I would like to click on the books and then get some sort of menu to e.g. select "words", "headings" as search mode. Update : I am not

Fast Text Search Over Logs

被刻印的时光 ゝ 提交于 2019-12-23 07:59:07
问题 Here's the problem I'm having, I've got a set of logs that can grow fairly quickly. They're split into individual files every day, and the files can easily grow up to a gig in size. To help keep the size down, entries older than 30 days or so are cleared out. The problem is when I want to search these files for a certain string. Right now, a Boyer-Moore search is unfeasibly slow. I know that applications like dtSearch can provide a really fast search using indexing, but I'm not really sure