Permalink
Browse files

Initial commit

  • Loading branch information...
0 parents commit 385ced4dcf674f55a85f4e9956b47cb1c6e3a760 @jingwei jingwei committed Dec 14, 2011
Showing with 21,316 additions and 0 deletions.
  1. +13 −0 .classpath
  2. +4 −0 .gitignore
  3. +202 −0 LICENSE
  4. +41 −0 README.md
  5. +1 −0 bin/maven-release
  6. +21 −0 config/linkedin/generic-typeahead/company/i001.config
  7. +21 −0 config/linkedin/generic-typeahead/company/i002.config
  8. +21 −0 config/linkedin/generic-typeahead/company/i003.config
  9. +21 −0 config/linkedin/network-typeahead/member/i001.config
  10. +21 −0 config/linkedin/network-typeahead/member/i002.config
  11. +21 −0 config/linkedin/network-typeahead/member/i003.config
  12. +21 −0 config/linkedin/network-typeahead/member/i004.config
  13. +21 −0 config/linkedin/network-typeahead/member/i005.config
  14. +21 −0 config/linkedin/network-typeahead/member/i006.config
  15. +21 −0 config/linkedin/network-typeahead/member/i007.config
  16. +21 −0 config/linkedin/network-typeahead/member/i008.config
  17. +21 −0 config/linkedin/network-typeahead/member/i009.config
  18. +21 −0 config/linkedin/network-typeahead/member/i010.config
  19. +21 −0 config/linkedin/network-typeahead/member/i011.config
  20. +21 −0 config/linkedin/network-typeahead/member/i012.config
  21. +21 −0 config/linkedin/network-typeahead/member/i013.config
  22. +21 −0 config/linkedin/network-typeahead/member/i014.config
  23. +21 −0 config/linkedin/network-typeahead/member/i015.config
  24. +21 −0 config/linkedin/network-typeahead/member/i016.config
  25. +21 −0 config/linkedin/network-typeahead/member/i017.config
  26. +21 −0 config/linkedin/network-typeahead/member/i018.config
  27. +21 −0 config/linkedin/network-typeahead/member/i019.config
  28. +21 −0 config/linkedin/network-typeahead/member/i020.config
  29. +21 −0 config/linkedin/network-typeahead/member/i021.config
  30. +21 −0 config/linkedin/network-typeahead/member/i022.config
  31. +21 −0 config/linkedin/network-typeahead/member/i023.config
  32. +21 −0 config/linkedin/network-typeahead/member/i024.config
  33. +21 −0 config/linkedin/network-typeahead/member/i025.config
  34. +21 −0 config/linkedin/network-typeahead/member/i026.config
  35. +21 −0 config/linkedin/network-typeahead/member/i027.config
  36. +21 −0 config/linkedin/network-typeahead/member/i028.config
  37. +21 −0 config/linkedin/network-typeahead/member/i029.config
  38. +21 −0 config/linkedin/network-typeahead/member/i030.config
  39. +21 −0 config/linkedin/network-typeahead/member/i031.config
  40. +21 −0 config/linkedin/network-typeahead/member/i032.config
  41. +237 −0 pom.xml
  42. +193 −0 src/examples/java/cleo/examples/CompanyTypeahead.java
  43. +176 −0 src/examples/java/cleo/examples/MyFriendsTypeahead.java
  44. +21 −0 src/examples/resources/company-config/i001.config
  45. +21 −0 src/examples/resources/company-config/i002.config
  46. +21 −0 src/examples/resources/network-config/i001.config
  47. +21 −0 src/examples/resources/network-config/i002.config
  48. +29 −0 src/main/java/cleo/search/Element.java
  49. +30 −0 src/main/java/cleo/search/ElementFactory.java
  50. +151 −0 src/main/java/cleo/search/ElementHit.java
  51. +15 −0 src/main/java/cleo/search/ElementSerializationException.java
  52. +17 −0 src/main/java/cleo/search/ElementSerializer.java
  53. +30 −0 src/main/java/cleo/search/Hit.java
  54. +21 −0 src/main/java/cleo/search/IndexRoller.java
  55. +31 −0 src/main/java/cleo/search/Indexer.java
  56. +63 −0 src/main/java/cleo/search/MultiIndexer.java
  57. +30 −0 src/main/java/cleo/search/Score.java
  58. +68 −0 src/main/java/cleo/search/Searcher.java
  59. +125 −0 src/main/java/cleo/search/SimpleElement.java
  60. +35 −0 src/main/java/cleo/search/SimpleElementFactory.java
  61. +39 −0 src/main/java/cleo/search/SimpleElementSerializer.java
  62. +86 −0 src/main/java/cleo/search/SimpleTypeaheadElement.java
  63. +38 −0 src/main/java/cleo/search/SimpleTypeaheadElementFactory.java
  64. +28 −0 src/main/java/cleo/search/TypeaheadElement.java
  65. +38 −0 src/main/java/cleo/search/TypeaheadElementSerializer.java
  66. +113 −0 src/main/java/cleo/search/collector/Collector.java
  67. +44 −0 src/main/java/cleo/search/collector/MultiCollector.java
  68. +173 −0 src/main/java/cleo/search/collector/MultiSourceCollector.java
  69. +109 −0 src/main/java/cleo/search/collector/NetworkSortedCollector.java
  70. +130 −0 src/main/java/cleo/search/collector/SimpleCollector.java
  71. +213 −0 src/main/java/cleo/search/collector/SortedCollector.java
  72. +56 −0 src/main/java/cleo/search/connection/Connection.java
  73. +28 −0 src/main/java/cleo/search/connection/ConnectionFilter.java
  74. +29 −0 src/main/java/cleo/search/connection/ConnectionIndexer.java
  75. +132 −0 src/main/java/cleo/search/connection/MultiConnectionIndexer.java
  76. +33 −0 src/main/java/cleo/search/connection/OpenConnectionFilter.java
  77. +17 −0 src/main/java/cleo/search/connection/PartitionConnectionFilter.java
  78. +33 −0 src/main/java/cleo/search/connection/RandomConnectionFilter.java
  79. +78 −0 src/main/java/cleo/search/connection/SimpleConnection.java
  80. +60 −0 src/main/java/cleo/search/connection/SourcePartitionConnectionFilter.java
  81. +60 −0 src/main/java/cleo/search/connection/TargetPartitionConnectionFilter.java
  82. +60 −0 src/main/java/cleo/search/connection/TransitivePartitionConnectionFilter.java
  83. +41 −0 src/main/java/cleo/search/filter/BloomFilter.java
  84. +81 −0 src/main/java/cleo/search/filter/FnvBloomFilter.java
  85. +81 −0 src/main/java/cleo/search/filter/FnvBloomFilterLong.java
  86. +60 −0 src/main/java/cleo/search/network/Network.java
  87. +49 −0 src/main/java/cleo/search/network/NetworkInfo.java
  88. +15 −0 src/main/java/cleo/search/network/Proximity.java
  89. +42 −0 src/main/java/cleo/search/selector/PrefixSelector.java
  90. +21 −0 src/main/java/cleo/search/selector/PrefixSelectorFactory.java
  91. +27 −0 src/main/java/cleo/search/selector/ScoredClicksSelector.java
  92. +21 −0 src/main/java/cleo/search/selector/ScoredClicksSelectorFactory.java
  93. +26 −0 src/main/java/cleo/search/selector/ScoredElementSelector.java
  94. +21 −0 src/main/java/cleo/search/selector/ScoredElementSelectorFactory.java
  95. +81 −0 src/main/java/cleo/search/selector/ScoredPrefixSelector.java
  96. +20 −0 src/main/java/cleo/search/selector/ScoredPrefixSelectorFactory.java
  97. +24 −0 src/main/java/cleo/search/selector/Selector.java
  98. +34 −0 src/main/java/cleo/search/selector/SelectorContext.java
  99. +17 −0 src/main/java/cleo/search/selector/SelectorFactory.java
  100. +123 −0 src/main/java/cleo/search/store/ArrayStoreConnections.java
  101. +83 −0 src/main/java/cleo/search/store/ArrayStoreElement.java
  102. +104 −0 src/main/java/cleo/search/store/ArrayStoreFilters.java
  103. +37 −0 src/main/java/cleo/search/store/ArrayStoreInts.java
  104. +97 −0 src/main/java/cleo/search/store/ArrayStoreWeights.java
  105. +60 −0 src/main/java/cleo/search/store/ConnectionsStore.java
  106. +31 −0 src/main/java/cleo/search/store/DataStoreInts.java
  107. +24 −0 src/main/java/cleo/search/store/DoubleArrayPartition.java
  108. +24 −0 src/main/java/cleo/search/store/FloatArrayPartition.java
  109. +24 −0 src/main/java/cleo/search/store/IntArrayPartition.java
  110. +307 −0 src/main/java/cleo/search/store/KratiArrayStore.java
  111. +76 −0 src/main/java/cleo/search/store/KratiArrayStoreConnections.java
  112. +432 −0 src/main/java/cleo/search/store/KratiArrayStoreCurrents.java
  113. +128 −0 src/main/java/cleo/search/store/KratiArrayStoreElement.java
  114. +306 −0 src/main/java/cleo/search/store/KratiArrayStoreFilters.java
  115. +222 −0 src/main/java/cleo/search/store/KratiArrayStoreInts.java
  116. +72 −0 src/main/java/cleo/search/store/KratiArrayStoreWeights.java
  117. +235 −0 src/main/java/cleo/search/store/KratiDataStore.java
  118. +46 −0 src/main/java/cleo/search/store/KratiDataStoreConnections.java
  119. +196 −0 src/main/java/cleo/search/store/KratiDataStoreInts.java
  120. +24 −0 src/main/java/cleo/search/store/LongArrayPartition.java
  121. +226 −0 src/main/java/cleo/search/store/MemoryArrayStoreElement.java
  122. +108 −0 src/main/java/cleo/search/store/MemoryConnectionsStore.java
  123. +75 −0 src/main/java/cleo/search/store/StaticDoubleArrayPartition.java
  124. +75 −0 src/main/java/cleo/search/store/StaticFloatArrayPartition.java
  125. +75 −0 src/main/java/cleo/search/store/StaticIntArrayPartition.java
  126. +75 −0 src/main/java/cleo/search/store/StaticLongArrayPartition.java
  127. +148 −0 src/main/java/cleo/search/store/StoreFactory.java
  128. +151 −0 src/main/java/cleo/search/store/Stores.java
  129. +183 −0 src/main/java/cleo/search/store/VirtualArrayStoreElement.java
  130. +110 −0 src/main/java/cleo/search/typeahead/AbstractTypeahead.java
  131. +150 −0 src/main/java/cleo/search/typeahead/BrowseTypeahead.java
  132. +97 −0 src/main/java/cleo/search/typeahead/BrowseTypeaheadConfig.java
  133. +505 −0 src/main/java/cleo/search/typeahead/GenericTypeahead.java
  134. +213 −0 src/main/java/cleo/search/typeahead/GenericTypeaheadConfig.java
  135. +148 −0 src/main/java/cleo/search/typeahead/GenericTypeaheadIndexRoller.java
  136. +56 −0 src/main/java/cleo/search/typeahead/HitStats.java
  137. +166 −0 src/main/java/cleo/search/typeahead/MultiTypeahead.java
  138. +44 −0 src/main/java/cleo/search/typeahead/NetworkTypeahead.java
  139. +215 −0 src/main/java/cleo/search/typeahead/NetworkTypeaheadConfig.java
  140. +33 −0 src/main/java/cleo/search/typeahead/NetworkTypeaheadContext.java
  141. +107 −0 src/main/java/cleo/search/typeahead/NetworkTypeaheadContextPlain.java
  142. +39 −0 src/main/java/cleo/search/typeahead/RangeException.java
  143. +29 −0 src/main/java/cleo/search/typeahead/RangeTypeahead.java
  144. +279 −0 src/main/java/cleo/search/typeahead/RollingTypeahead.java
  145. +244 −0 src/main/java/cleo/search/typeahead/ScannerTypeahead.java
  146. +13 −0 src/main/java/cleo/search/typeahead/ScannerTypeaheadConfig.java
  147. +18 −0 src/main/java/cleo/search/typeahead/Typeahead.java
  148. +215 −0 src/main/java/cleo/search/typeahead/TypeaheadConfigFactory.java
  149. +53 −0 src/main/java/cleo/search/typeahead/TypeaheadTask.java
  150. +767 −0 src/main/java/cleo/search/typeahead/VanillaNetworkTypeahead.java
  151. +817 −0 src/main/java/cleo/search/typeahead/WeightedNetworkTypeahead.java
  152. +42 −0 src/main/java/cleo/search/util/CompositeTermsHandler.java
  153. +34 −0 src/main/java/cleo/search/util/ConnectionStrengthAdjuster.java
  154. +21 −0 src/main/java/cleo/search/util/ConnectionStrengthHandler.java
  155. +21 −0 src/main/java/cleo/search/util/ConnectionsHandler.java
  156. +89 −0 src/main/java/cleo/search/util/ConnectionsScanner.java
  157. +19 −0 src/main/java/cleo/search/util/DaemonThreadFactory.java
  158. +20 −0 src/main/java/cleo/search/util/ElementHitScoreComparator.java
  159. +19 −0 src/main/java/cleo/search/util/ElementScoreComparator.java
  160. +30 −0 src/main/java/cleo/search/util/ElementScoreHandler.java
  161. +77 −0 src/main/java/cleo/search/util/ElementScoreScanner.java
  162. +30 −0 src/main/java/cleo/search/util/ElementScoreSetter.java
  163. +20 −0 src/main/java/cleo/search/util/IntIterator.java
  164. +41 −0 src/main/java/cleo/search/util/IntIteratorFromBytes.java
  165. +47 −0 src/main/java/cleo/search/util/MultiConnectionStrengthHandler.java
  166. +49 −0 src/main/java/cleo/search/util/MultiConnectionsHandler.java
  167. +44 −0 src/main/java/cleo/search/util/PropertiesResolver.java
  168. +57 −0 src/main/java/cleo/search/util/Range.java
  169. +43 −0 src/main/java/cleo/search/util/ResourcePool.java
  170. +16 −0 src/main/java/cleo/search/util/ScnFactory.java
  171. +13 −0 src/main/java/cleo/search/util/ScoreHandler.java
  172. +18 −0 src/main/java/cleo/search/util/ScoreScanner.java
  173. +32 −0 src/main/java/cleo/search/util/StringIterator.java
  174. +61 −0 src/main/java/cleo/search/util/Strings.java
  175. +15 −0 src/main/java/cleo/search/util/SystemNanoTimeScnFactory.java
  176. +15 −0 src/main/java/cleo/search/util/SystemTimeScnFactory.java
  177. +45 −0 src/main/java/cleo/search/util/TermsDedup.java
  178. +13 −0 src/main/java/cleo/search/util/TermsExtractor.java
  179. +13 −0 src/main/java/cleo/search/util/TermsHandler.java
  180. +107 −0 src/main/java/cleo/search/util/TermsScanner.java
  181. +40 −0 src/main/java/cleo/search/util/Weight.java
  182. +16 −0 src/main/java/cleo/search/util/WeightAdjuster.java
  183. +19 −0 src/main/java/cleo/search/util/WeightIterator.java
  184. +51 −0 src/main/java/cleo/search/util/WeightIteratorFromBytes.java
  185. +91 −0 src/main/java/cleo/search/util/Weights.java
  186. +159 −0 src/test/java/cleo/search/test/TestBloomFilter.java
  187. +129 −0 src/test/java/cleo/search/test/TestCollector.java
  188. +249 −0 src/test/java/cleo/search/test/TestConnectionFilter.java
  189. +82 −0 src/test/java/cleo/search/test/TestElementHit.java
  190. +77 −0 src/test/java/cleo/search/test/TestNetworkSortedCollector.java
  191. +377 −0 src/test/java/cleo/search/test/TestSelector.java
  192. +154 −0 src/test/java/cleo/search/test/TestWeight.java
  193. +69 −0 src/test/java/cleo/search/test/TestWeightAdjuster.java
  194. +80 −0 src/test/java/cleo/search/test/TestWeightIterator.java
  195. +108 −0 src/test/java/cleo/search/test/store/TestArrayPartition.java
  196. +157 −0 src/test/java/cleo/search/test/store/TestArrayStoreElement.java
  197. +255 −0 src/test/java/cleo/search/test/store/TestArrayStoreFilters.java
  198. +110 −0 src/test/java/cleo/search/test/store/TestConnectionsStore.java
  199. +178 −0 src/test/java/cleo/search/test/store/TestDataStoreInts.java
  200. +179 −0 src/test/java/cleo/search/test/store/TestKratiDataStore.java
  201. +62 −0 src/test/java/cleo/search/test/store/TestMemoryArrayStoreElement.java
  202. +19 −0 src/test/java/cleo/search/test/store/TestMemoryConnectionsStore.java
  203. +101 −0 src/test/java/cleo/search/test/store/TestMultiSourceArrayStoreElement.java
  204. +105 −0 src/test/java/cleo/search/test/store/TestStores.java
  205. +29 −0 src/test/java/cleo/search/test/store/TestVirtualArrayStoreElement.java
  206. +46 −0 src/test/java/cleo/search/test/term/TestTermsHandler.java
  207. +102 −0 src/test/java/cleo/search/test/typeahead/AbstractTestBrowseTypeahead.java
  208. +138 −0 src/test/java/cleo/search/test/typeahead/AbstractTestGenericTypeahead.java
  209. +101 −0 src/test/java/cleo/search/test/typeahead/AbstractTestScannerTypeahead.java
  210. +144 −0 src/test/java/cleo/search/test/typeahead/AbstractTestVanillaNetworkTypeahead.java
  211. +144 −0 src/test/java/cleo/search/test/typeahead/AbstractTestWeightedNetworkTypeahead.java
  212. +90 −0 src/test/java/cleo/search/test/typeahead/TestBrowseTypeahead.java
  213. +37 −0 src/test/java/cleo/search/test/typeahead/TestBrowseTypeaheadConfig.java
  214. +159 −0 src/test/java/cleo/search/test/typeahead/TestGenericTypeahead.java
  215. +54 −0 src/test/java/cleo/search/test/typeahead/TestGenericTypeaheadConfig.java
  216. +72 −0 src/test/java/cleo/search/test/typeahead/TestGenericTypeaheadExtendedSearch.java
  217. +23 −0 src/test/java/cleo/search/test/typeahead/TestGenericTypeaheadRollingDisabled.java
  218. +23 −0 src/test/java/cleo/search/test/typeahead/TestGenericTypeaheadRollingEnabled.java
  219. +112 −0 src/test/java/cleo/search/test/typeahead/TestScannerTypeahead.java
  220. +36 −0 src/test/java/cleo/search/test/typeahead/TestScannerTypeaheadConfig.java
  221. +65 −0 src/test/java/cleo/search/test/typeahead/TestScannerTypeaheadScoredSelector.java
  222. +60 −0 src/test/java/cleo/search/test/typeahead/TestVanillaNetworkTypeahead.java
  223. +47 −0 src/test/java/cleo/search/test/typeahead/TestVanillaNetworkTypeaheadConfig.java
  224. +420 −0 src/test/java/cleo/search/test/typeahead/TestWeightedNetworkTypeahead.java
  225. +19 −0 src/test/java/cleo/search/test/typeahead/TestWeightedNetworkTypeaheadCached.java
  226. +47 −0 src/test/java/cleo/search/test/typeahead/TestWeightedNetworkTypeaheadConfig.java
  227. +56 −0 src/test/java/cleo/search/test/util/FileUtils.java
  228. +110 −0 src/test/java/cleo/search/test/word/SimpleTermsExtractor.java
  229. +13 −0 src/test/java/cleo/search/test/word/StopWords.java
  230. +65 −0 src/test/java/cleo/search/test/word/StopWordsEn.java
  231. +17 −0 src/test/java/cleo/search/test/word/Words.java
  232. +25 −0 src/test/resources/log4j.properties
  233. +185 −0 src/tool/java/cleo/search/bootstrap/ArrayStoreConnectionsBootstrap.java
  234. +51 −0 src/tool/java/cleo/search/bootstrap/ArrayStoreElementBootstrap.java
  235. +92 −0 src/tool/java/cleo/search/bootstrap/ConnectionsCollector.java
  236. +113 −0 src/tool/java/cleo/search/bootstrap/GenericTypeaheadBootstrap.java
  237. +86 −0 src/tool/java/cleo/search/bootstrap/GenericTypeaheadConnectionsStoreBootstrap.java
  238. +82 −0 src/tool/java/cleo/search/bootstrap/NetworkTypeaheadConnectionsStoreBootstrap.java
  239. +111 −0 src/tool/java/cleo/search/bootstrap/NetworkTypeaheadWeightedConnectionsStoreBootstrap.java
  240. +85 −0 src/tool/java/cleo/search/bootstrap/NetworkTypeaheadWeightedConnectionsStoreMaxScn.java
  241. +168 −0 src/tool/java/cleo/search/bootstrap/TypeaheadElementStoreBootstrap.java
  242. +93 −0 src/tool/java/cleo/search/bootstrap/WeightedConnectionsStoreConnectionStrengthHandler.java
  243. +71 −0 src/tool/java/cleo/search/bootstrap/WeightedConnectionsStoreConnectionsHandler.java
  244. +249 −0 src/tool/java/cleo/search/copy/Copy.java
  245. +123 −0 src/tool/java/cleo/search/copy/CopyVanillaNetworkTypeahead.java
  246. +123 −0 src/tool/java/cleo/search/copy/CopyWeightedNetworkTypeahead.java
  247. +65 −0 src/tool/java/cleo/search/tool/BrowseTypeaheadInitializer.java
  248. +18 −0 src/tool/java/cleo/search/tool/ConnectionIndexerInitializer.java
  249. +99 −0 src/tool/java/cleo/search/tool/GenericTypeaheadInitializer.java
  250. +19 −0 src/tool/java/cleo/search/tool/IndexerInitializer.java
  251. +62 −0 src/tool/java/cleo/search/tool/KratiArrayStoreIntsDiff.java
  252. +238 −0 src/tool/java/cleo/search/tool/KratiArrayStoreIntsScan.java
  253. +41 −0 src/tool/java/cleo/search/tool/MultiIndexerInitializer.java
  254. +31 −0 src/tool/java/cleo/search/tool/MultiTypeaheadInitializer.java
  255. +66 −0 src/tool/java/cleo/search/tool/ScannerTypeaheadInitializer.java
  256. +19 −0 src/tool/java/cleo/search/tool/TypeaheadInitializer.java
  257. +87 −0 src/tool/java/cleo/search/tool/VanillaNetworkTypeaheadInitializer.java
  258. +93 −0 src/tool/java/cleo/search/tool/WeightedNetworkTypeaheadInitializer.java
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src/main/java"/>
+ <classpathentry kind="src" path="src/tool/java"/>
+ <classpathentry kind="src" path="src/test/java"/>
+ <classpathentry kind="src" path="src/examples/java"/>
+ <classpathentry kind="src" path="src/examples/resources"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="var" path="M2_REPO/com/sna-projects/krati/krati/0.4.2.3/krati-0.4.2.3.jar"/>
+ <classpathentry kind="var" path="M2_REPO/log4j/log4j/1.2.16/log4j-1.2.16.jar"/>
+ <classpathentry kind="var" path="M2_REPO/junit/junit/4.5/junit-4.5.jar"/>
+ <classpathentry kind="output" path="eclipse-build"/>
+</classpath>
@@ -0,0 +1,4 @@
+eclipse-build
+target
+docs
+logs
202 LICENSE
@@ -0,0 +1,202 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
@@ -0,0 +1,41 @@
+What is Cleo?
+=======================
+
+Cleo is a flexible software library for enabling rapid development of partial, out-of-order and real-time typeahead search.
+It is suitable for data sets of varying sizes and types. Cleo has been used extensively to power LinkedIn typeahead search
+covering professional network connections, companies, groups, questions, skills and other site features.
+
+### Homepage:
+
+Find out more about Cleo at: http://sna-projects.com/cleo
+
+### License:
+
+Apache Public License (APL) 2.0
+
+### Artifacts:
+
+1. cleo.jar <-- core library
+
+### Maven:
+
+groupId: com.sna-projects.cleo
+
+artifactId: cleo
+
+version: 1.2.1
+
+### Code Examples:
+
+https://github.com/jingwei/cleo/tree/master/src/examples
+
+### Eclipse:
+
+Set up Eclipse for Cleo by executing the command below:
+
+mvn eclipse:eclipse
+
+Inside Eclipse, select Preferences > Java > Build Path > Classpath Variables. Define a new classpath variable M2_REPO and assign maven repository.
+
+For more information, check out http://maven.apache.org/guides/mini/guide-ide-eclipse.html
+
@@ -0,0 +1 @@
+mvn -DperformRelease=true -Dmaven.test.skip=true deploy
@@ -0,0 +1,21 @@
+cleo.search.generic.typeahead.config.name=i001
+cleo.search.generic.typeahead.config.partition.start=0
+cleo.search.generic.typeahead.config.partition.count=1000000
+cleo.search.generic.typeahead.config.homeDir=generic-typeahead/company/i001
+
+cleo.search.generic.typeahead.config.elementSerializer.class=cleo.search.TypeaheadElementSerializer
+
+cleo.search.generic.typeahead.config.elementStoreDir=${cleo.search.generic.typeahead.config.homeDir}/element-store
+cleo.search.generic.typeahead.config.elementStoreIndexStart=${cleo.search.generic.typeahead.config.partition.start}
+cleo.search.generic.typeahead.config.elementStoreCapacity=${cleo.search.generic.typeahead.config.partition.count}
+cleo.search.generic.typeahead.config.elementStoreSegmentMB=32
+cleo.search.generic.typeahead.config.elementStoreCached=true
+
+cleo.search.generic.typeahead.config.connectionsStoreDir=${cleo.search.generic.typeahead.config.homeDir}/connections-store
+cleo.search.generic.typeahead.config.connectionsStoreCapacity=1000000
+cleo.search.generic.typeahead.config.connectionsStoreSegmentMB=64
+cleo.search.generic.typeahead.config.connectionsStoreIndexSegmentMB=8
+
+cleo.search.generic.typeahead.config.filterPrefixLength=2
+cleo.search.generic.typeahead.config.maxKeyLength=5
+
@@ -0,0 +1,21 @@
+cleo.search.generic.typeahead.config.name=i002
+cleo.search.generic.typeahead.config.partition.start=1000000
+cleo.search.generic.typeahead.config.partition.count=1000000
+cleo.search.generic.typeahead.config.homeDir=generic-typeahead/company/i002
+
+cleo.search.generic.typeahead.config.elementSerializer.class=cleo.search.TypeaheadElementSerializer
+
+cleo.search.generic.typeahead.config.elementStoreDir=${cleo.search.generic.typeahead.config.homeDir}/element-store
+cleo.search.generic.typeahead.config.elementStoreIndexStart=${cleo.search.generic.typeahead.config.partition.start}
+cleo.search.generic.typeahead.config.elementStoreCapacity=${cleo.search.generic.typeahead.config.partition.count}
+cleo.search.generic.typeahead.config.elementStoreSegmentMB=32
+cleo.search.generic.typeahead.config.elementStoreCached=true
+
+cleo.search.generic.typeahead.config.connectionsStoreDir=${cleo.search.generic.typeahead.config.homeDir}/connections-store
+cleo.search.generic.typeahead.config.connectionsStoreCapacity=1000000
+cleo.search.generic.typeahead.config.connectionsStoreSegmentMB=64
+cleo.search.generic.typeahead.config.connectionsStoreIndexSegmentMB=8
+
+cleo.search.generic.typeahead.config.filterPrefixLength=2
+cleo.search.generic.typeahead.config.maxKeyLength=5
+
@@ -0,0 +1,21 @@
+cleo.search.generic.typeahead.config.name=i003
+cleo.search.generic.typeahead.config.partition.start=2000000
+cleo.search.generic.typeahead.config.partition.count=1000000
+cleo.search.generic.typeahead.config.homeDir=generic-typeahead/company/i003
+
+cleo.search.generic.typeahead.config.elementSerializer.class=cleo.search.TypeaheadElementSerializer
+
+cleo.search.generic.typeahead.config.elementStoreDir=${cleo.search.generic.typeahead.config.homeDir}/element-store
+cleo.search.generic.typeahead.config.elementStoreIndexStart=${cleo.search.generic.typeahead.config.partition.start}
+cleo.search.generic.typeahead.config.elementStoreCapacity=${cleo.search.generic.typeahead.config.partition.count}
+cleo.search.generic.typeahead.config.elementStoreSegmentMB=32
+cleo.search.generic.typeahead.config.elementStoreCached=true
+
+cleo.search.generic.typeahead.config.connectionsStoreDir=${cleo.search.generic.typeahead.config.homeDir}/connections-store
+cleo.search.generic.typeahead.config.connectionsStoreCapacity=1000000
+cleo.search.generic.typeahead.config.connectionsStoreSegmentMB=64
+cleo.search.generic.typeahead.config.connectionsStoreIndexSegmentMB=8
+
+cleo.search.generic.typeahead.config.filterPrefixLength=2
+cleo.search.generic.typeahead.config.maxKeyLength=5
+
@@ -0,0 +1,21 @@
+cleo.search.network.typeahead.config.name=i001
+cleo.search.network.typeahead.config.partition.start=0
+cleo.search.network.typeahead.config.partition.count=5000000
+cleo.search.network.typeahead.config.homeDir=network-typeahead/member/i001
+
+cleo.search.network.typeahead.config.elementSerializer.class=cleo.search.TypeaheadElementSerializer
+cleo.search.network.typeahead.config.connectionFilter.class=cleo.search.connection.TransitivePartitionConnectionFilter
+
+cleo.search.network.typeahead.config.elementStoreDir=${cleo.search.network.typeahead.config.homeDir}/element-store
+cleo.search.network.typeahead.config.elementStoreIndexStart=${cleo.search.network.typeahead.config.partition.start}
+cleo.search.network.typeahead.config.elementStoreCapacity=${cleo.search.network.typeahead.config.partition.count}
+cleo.search.network.typeahead.config.elementStoreSegmentMB=32
+cleo.search.network.typeahead.config.elementStoreCached=true
+
+cleo.search.network.typeahead.config.connectionsStoreDir=${cleo.search.network.typeahead.config.homeDir}/weighted-connections-store
+cleo.search.network.typeahead.config.connectionsStoreIndexStart=0
+cleo.search.network.typeahead.config.connectionsStoreCapacity=150000000
+cleo.search.network.typeahead.config.connectionsStoreSegmentMB=64
+
+cleo.search.network.typeahead.config.filterPrefixLength=2
+
@@ -0,0 +1,21 @@
+cleo.search.network.typeahead.config.name=i002
+cleo.search.network.typeahead.config.partition.start=5000000
+cleo.search.network.typeahead.config.partition.count=5000000
+cleo.search.network.typeahead.config.homeDir=network-typeahead/member/i002
+
+cleo.search.network.typeahead.config.elementSerializer.class=cleo.search.TypeaheadElementSerializer
+cleo.search.network.typeahead.config.connectionFilter.class=cleo.search.connection.TransitivePartitionConnectionFilter
+
+cleo.search.network.typeahead.config.elementStoreDir=${cleo.search.network.typeahead.config.homeDir}/element-store
+cleo.search.network.typeahead.config.elementStoreIndexStart=${cleo.search.network.typeahead.config.partition.start}
+cleo.search.network.typeahead.config.elementStoreCapacity=${cleo.search.network.typeahead.config.partition.count}
+cleo.search.network.typeahead.config.elementStoreSegmentMB=32
+cleo.search.network.typeahead.config.elementStoreCached=true
+
+cleo.search.network.typeahead.config.connectionsStoreDir=${cleo.search.network.typeahead.config.homeDir}/weighted-connections-store
+cleo.search.network.typeahead.config.connectionsStoreIndexStart=0
+cleo.search.network.typeahead.config.connectionsStoreCapacity=150000000
+cleo.search.network.typeahead.config.connectionsStoreSegmentMB=64
+
+cleo.search.network.typeahead.config.filterPrefixLength=2
+
Oops, something went wrong.

0 comments on commit 385ced4

Please sign in to comment.