一个很好的代码搜索引擎 Koders.com

Second, we use proprietary user heuristics to allow more popular code files to work their way to the top. Essentially, the more reuse a code file receives, the more likely it will appear higher in your search results.

With that in mind, Koders provides various ways to restrict or expand search results by using special operators on your search terms. The following summarizes various ways to modify your search queries to increase your probability of relevancy.

Search Syntax

Note: With the exception of CamelCase, searches are case-insensitive. Searching for 'Xml' is the same as searching for 'XML' is the same as search for 'xML' etc.

Search for phrases

You can search for phrases such as "public event" by enclosing the search term in double quotes.


CamelCase

When using CamelCase, the terms are queried as separate terms. foreachtfffag would return search results as if you entered "for each tag". To search as a single term, keep everything lowercase -- foreachtag.


Stemming: the * operator

Terms can be stemmed with the * operator. The results will include all terms that start with the terms specified.


For example, searching for 'xmlre*' will find files containing all words starting with 'xmlre' such as xmlreader, etc.

Excluding terms: the - operator

The results will include all files containing terms you specify and not the terms you have excluded.


For example, searching 'xmlre* -xmlreader' will return files containing any term starting with xmlre, excluding files that contain xmlreader.

Multiple terms are ANDed together

The results will include all files containing all the terms you specify in the search box. This is known as a logical AND.


For example, searching for 'smtp server' will find all files containing 'smtp' AND 'server'.

Class Definitions

Search for classes whose name contains <search term>


For example, searching for 'cdef:parser' will return files with class names containing 'parser'.

Method Definitions

Search for methods whose name contains <search term>


For example, searching for 'mdef:insert' will return files with method names containing 'insert'

Interface Definitions

Search for interfaces whose name contains <search term>


For example, searching for 'idef:configuration' will return files with interface names containing 'configuration'.

Compound Definitions

Search for classes named 'tree' with a method named 'insert'


For example, searching for 'cdef:tree mdef:insert' will return files with classes named 'tree' with a method named 'insert'




评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值