In RhodeCode, is it possible to index gists for search? - rhodecode

I'd like to see gist contents included in my search results.
I've examined the configuration options and googled the topic but could not find any way to include them.

Gist are not yet indexed by Whoosh, but it's a good idea to add this for public gists. Private must remain un-indexed since the URL is the ACL in their case and search would leak the content. We have indexer improvements on our TODO lists for 2014. I'll make sure we discuss the GIST indexing.

Related

MediaWiki search in <syntaxhighlight> tag (SyntaxHighlight GeSHi extension)

How to enable searching in <syntaxhighlight> tag (SyntaxHighlight GeSHi extension)? I'm trying to search for com.android.chrome in it, but no result found :-(. String is IMHO long enough to be found.
<syntaxhighlight lang="java">
supproclist.add("com.whatsapp");
supproclist.add("com.android.chrome");
</syntaxhighlight>
You don't need to do anything special; everything within <syntaxhighlight> tags is already included in the normal site-wide search system (based on MySQL search).
Edit: You definitely should be getting a match on com.android.chrome. Is this on a public wiki? Can you provide a link?
You won't get a result when searching for com.android however, because the search system only finds whole words, and the dot is considered part of the word. This is quite separate from, and not changed by, the SyntaxHightlight extension.

Full form of "DSL" in query DSL - elastic search

I'll probably be downvoted to death for this one, but I'll try my luck anyways.
I really cannot find any link for the full form of "DSL" of Elastic Search Query DSL, not even on Elastic Search website here!
(Just to keep things interesting, the link (above) talks about another unexplained acronym "AST" - AST of queries!)
Based on the context:
DSL stands for Domain Specific Language
AST stands for Abstract Syntax Tree
See this reference.

How do I see/debug the way SOLR find it's results?

Let's say I search for "ABLS" and the SOLR returns a result that to me does not make any sense.
How can I debug why SOLR picked this record to be returned?
debugQuery=true would help you get the detailed score calculation and the explanation for each scores.
An over view of the scoring is available at link
For detailed explaination of the debug information you can refer Link
You could add debugQuery=true&indent=true to the url and examine the results. You could also use the analysis tool in solr. Go to the admin and click analysis. You would need to read the wiki to understand either of these more in depth.
queryDebug will give you knowledge about why your scoring looks like it does (end how every field is relevant).
I will get some results that you are not understand and play with them with Solr's analysis
You should find it under:
/admin/analysis.jsp?highlight=on
Alternatively turn on highlighting over your results to see what is actually matching in your results
Solr queries are full of short parameters, hard to read and modify, especially when the parameters are too many.
And after it is even harder to debug and understand why a document is more or less relevant than another. The debug explain output usually is a three too big to fit in one page.
I found this Google Chrome extension useful to see Solr Query explain and debug in a clear manner.
For those who still use very old version of solr 3.X, "debugQuery=true" will not put the debug information. you should specify "debugQuery=on".
There are two ways of doing that. First is the query level, which means adding the debugQuery=on to your query. That will include a few things:
parsed query
debug timing information
detailed scoring information which helps you with analysis of why a give document is given a score.
In addition to that, you can use the [explain] transformer and add it to your fl parameter. For example ...&fl=*,[explain], which will result in your documents having the scoring information as another field.
The scoring information can be quite extensive and will include calculations done by the similarity algorithm. If you would like to learn more about the similarities and the scoring algorithm in Solr, have a look at this my and my colleague Radu from Sematext talk from the Activate conference: https://www.youtube.com/watch?v=kKocQdYGVJM

Is there a way to exclude unnecessary classes from a keyword search in MSDN?

When using "keyword search" in offline MSDN that came with VS2008, is there any way to exclude unnecessary classes / namespaces that I know beforehand is out of the scope of my search? The search "filter" seems way to broad for this purpose.
To be specific, when I search for a class, say "ListView", I DO NOT want System.Web.UI class to show up as the first suggestion just because it is the first one alphabetically, and instead would like to see System.Windows.Forms.ListView as the document that comes up. I guess I could live with going to search result and browse through to find the intended class, or maybe typing class names with full namespace... But it would make my life easier if I could either temporary or even permanently (I know I won't touch ASP.NET for a while) remove unnecessary classes from the search index.
TIA
After trying several options I found out that manually taking the .HXS files associated with the unneeded namespaces out of the MSDN directory (In my case, C:\Program Files\MSDN\MSDN9.0\1041) seems to do the trick. MSDN document explorer recreates help index on the next launch after the content of the directory was modified. So even in case you need the documentation again, you can restore the help by simply moving the files back into the original folder.
The files I moved to take out System.Web.UI documentations were:
fxref_system.web.ui.adapters.hxs
fxref_system.web.ui.desi_obilecontrols.converters.hxs
fxref_system.web.ui.design.hxs
fxref_system.web.ui.design.mobilecontrols.hxs
fxref_system.web.ui.design.webcontrols.hxs
fxref_system.web.ui.design.webcontrols.webparts.hxs
fxref_system.web.ui.htmlcontrols.hxs
fxref_system.web.ui.hxs
fxref_system.web.ui.mobi_s.adapters.xhtmladapters.hxs
fxref_system.web.ui.mobilecontrols.adapters.hxs
fxref_system.web.ui.mobilecontrols.hxs
fxref_system.web.ui.webcontrols.adapters.hxs
fxref_system.web.ui.webcontrols.hxs
fxref_system.web.ui.webcontrols.webparts.hxs
Was pretty surprised when I saw this kind of somewhat primitive and forcible method to be the most effective...
Type "listview NOT System.Web.UI.ListView" for example - without the quotes :)

Searching a datastore for related topics by keyword

For example, how does StackOverflow decide other questions are similar?
When I typed in the question above and then tabbed to this memo control I saw a list of existing questions which might be the same as the one I am asking.
What technique is used to find similar questions?
I got an email from team#stackoverflow.com on Mar 20 that mentions how it works:
the "ask a question" search is
exclusively on title and will not
match anything in the body. It is a
mystery to me why people think it's
better.
The last sentence refers to the search bar, which I've found is less useful when I'm trying to find a specific question I've already seen.
I think it's plain old word matching. However, I might add that this feature does not work as well as I would like it to. It's much better to do google search with site:stackoverflow.com prefix than to rely on SO to provide the relevant suggestions.
Poorly -- using MS SQL Full Text Search, I believe. You'll have better luck using Lucene, IMO. For more background on the topic see the Wikipedia article on Lucene or the general topic of information retrieval.
The matching program would store an index of all questions. When you ask a question, all keywords in your question are matched against the index. This is similar to Google Search. Lucene open source search can be (and with high probability has been) used for this. Since the results are not quite accurate, I presume they index just the headlines of the questions, as an approximation.
The other related keyword is collaborative filtering, the algorithm popularized by Amazon to recommend products based on behavior of other similar customers. In the current case, an alternative algorithm based on collaborative filtering is: keywords are extracted from the question, then tags associated (in the history) with the keywords are found. Questions which have those tags are returned. Well, experiments are needed to see whether it works well at all.

Resources