highlighting

Curious behaviour of fragment_size in elasticsearch highlighting

时间秒杀一切 提交于 2019-12-03 11:09:50
TL;DR : I don't understand how highlighting is working, and more precisely how fragment_size influences the highlighting. On a new ES installation (1.4.2), I'm creating an index with the following settings : { "mappings" : { "test": { "properties": { "content" : { "type" : "string", "analyzer" : "french" } } } } } Then, I'm inserting the following document : { "content": "Bon alors mettons que j'ouvre avec un sirop de huit. Si c'est vous qui avez siroté au tour d'avant, ça tourne dans votre sens. Soit vous laissez filer, vous dites file-sirop, soit vous vous sentez de relancer et vous annoncez

Show count of occurrences when smart highlighting in Notepad++

那年仲夏 提交于 2019-12-03 10:26:16
Is it possible to show the number of occurrences of words which are smart highlighted? I mean when you double click on a word. In Matlab e.g. smart highlighting is activated by having the cursor touching a word and in the tool bar it instantly says for instance 4 usages of "weight" found . Doing a search for the word/phrase will give you the same information, but how about having the count directly be shown somewhere? BTW: Can smart highlighting be activated in a different manner than double clicking? AdrianHHH You can get counts of words or matches in other ways. The normal Find window has a

Search keyword highlight in ASP.Net

我怕爱的太早我们不能终老 提交于 2019-12-03 09:51:59
问题 I am outputting a list of search results for a given string of keywords, and I want any matching keywords in my search results to be highlighted. Each word should be wrapped in a span or similar. I am looking for an efficient function to do this. E.g. Keywords: "lorem ipsum" Result: "Some text containing lorem and ipsum" Desired HTML output: " Some text containing <span class="hit">lorem</span> and <span class="hit">ipsum</span> " My results are case insensitive. 回答1: Here's what I've decided

PHP/MySQL: Highlight “SOUNDS LIKE” query results

青春壹個敷衍的年華 提交于 2019-12-03 09:08:43
Quick MYSQL/PHP question. I'm using a "not-so-strict" search query as a fallback if no results are found with a normal search query, to the tune of: foreach($find_array as $word) { clauses[] = "(firstname SOUNDS LIKE '$word%' OR lastname SOUNDS LIKE '$word%')"; } if (!empty($clauses)) $filter='('.implode(' AND ', $clauses).')'; $query = "SELECT * FROM table WHERE $filter"; Now, I'm using PHP to highlight the results, like: foreach ($find_array as $term_to_highlight){ foreach ($result as $key => $result_string){ $result[$key]=highlight_stuff($result_string, $term_to_highlight); } } But this

How to get Visual Studio 2010 to highlight instances of a variable

最后都变了- 提交于 2019-12-03 08:17:03
问题 I'm new using vs2010 I've read that when you click on a variable its suppose to highlight all the instances of that variable in that file and highlight red or show an error as well where the number line is located. How can I get vs2010 to do this because by default it doesn't do that for me and it would be great for the highlighting to work. Thanks. 回答1: The Highlight all occurrences of selected word extension in Visual Studio Gallery does just that. 回答2: Productivity Power Tools for 2010 in

Android listview no longer highlights selection onclick

有些话、适合烂在心里 提交于 2019-12-03 03:31:56
I have a listview that was showing a yellowtint on items when I touched them. All I've done differently is change the background image in that listview xml , and now it no longer will show me the yellowtint Here is code the list view xml, it is just a textview with a background image: <?xml version="1.0" encoding="utf-8"?> <TextView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" android:padding="10dp" android:textSize="24sp" android:textColor="#000000" android:background="@drawable/bglistitem" android:gravity=

Syntax Highlighting in Notepad++: How to treat a user-defined language as built-in?

删除回忆录丶 提交于 2019-12-03 03:00:26
This is a very minor issue that has nonetheless annoyed me for months. I've spent hours Googling it to no avail. To enable syntax highlighting of .ahk files in Notepad++, I've downloaded & imported an .xml file for AutoHotkey. The issue is that- to enable this highlighting- I have to manually select it from the "Language" drop-down. I'd like to it to be enabled whenever an .ahk file is opened, as it is for various other languages. I've tried adding the .ahk extension to the AutoIt language in the Style Configurator, which does nothing for me. Any ideas? I can't be the first person to have been

Search keyword highlight in ASP.Net

谁说胖子不能爱 提交于 2019-12-03 01:28:18
I am outputting a list of search results for a given string of keywords, and I want any matching keywords in my search results to be highlighted. Each word should be wrapped in a span or similar. I am looking for an efficient function to do this. E.g. Keywords: "lorem ipsum" Result: "Some text containing lorem and ipsum" Desired HTML output: " Some text containing <span class="hit">lorem</span> and <span class="hit">ipsum</span> " My results are case insensitive. TimS Here's what I've decided on. An extension function that I can call on the relevant strings within my page / section of my page:

highlight div1 and div2 on div2 mousover, highlight nothing on div1 mouseover

余生长醉 提交于 2019-12-02 13:28:44
Div highlighting question I have 2 divs stacked on top of each other inside a container. Here is the behavior I want: when you mouseover the top div, nothing happens. when you mouse over the bottom div, the top div background changes color, and the bottom div's background changes a different color. In the sample code I tried, mousing over the container div makes the top turn green and the bottom turn vlueviolet. I want a mouseover on the bottom to cause this behavior, but I want a mouseover on the top to do nothing. I feel like I could get this done in jQuery using a parent selector or

Solr: Using Regex fragmenter to extract paragraphs

淺唱寂寞╮ 提交于 2019-12-02 05:28:25
问题 I posted this message to the Solr mailing list, but I'm trying here too in case there's a Solr expert lurking around. I am trying to use the regex fragmenter and am having a hard time getting the results I want. I am trying to get fragments that start on a word character and end on punctuation, but for some reason the fragments being returned to me seem to be very inflexible, despite that I've provided a large slop. Here are the relevant parameters I'm using, maybe someone can help point out