├── src ├── clj │ └── clojureranker │ │ ├── core.clj │ │ ├── test.clj │ │ ├── repl.clj │ │ ├── request.clj │ │ └── solr.clj └── java │ └── clojureranker │ ├── ClojureUtils.java │ ├── Rescorer.java │ └── ClojureRequest.java ├── doc └── intro.md ├── .gitignore ├── .idea ├── vcs.xml ├── ClojureProjectResolveSettings.xml ├── modules.xml ├── libraries │ ├── Leiningen__nrepl_0_7_0.xml │ ├── Leiningen__commons_io_2_5.xml │ ├── Leiningen__org_ow2_asm_asm_5_1.xml │ ├── Leiningen__org_rrd4j_rrd4j_3_5.xml │ ├── Leiningen__commons_cli_1_2.xml │ ├── Leiningen__com_google_re2j_re2j_1_2.xml │ ├── Leiningen__com_lmax_disruptor_3_4_2.xml │ ├── Leiningen__com_tdunning_t_digest_3_1.xml │ ├── Leiningen__commons_codec_1_11.xml │ ├── Leiningen__com_carrotsearch_hppc_0_8_1.xml │ ├── Leiningen__org_clojure_clojure_1_10_0.xml │ ├── Leiningen__org_ow2_asm_asm_commons_5_1.xml │ ├── Leiningen__org_slf4j_slf4j_api_1_7_24.xml │ ├── Leiningen__org_bitbucket_b_c_jose4j_0_6_5.xml │ ├── Leiningen__clojure_complete_0_2_5.xml │ ├── Leiningen__com_google_guava_guava_25_1_jre.xml │ ├── Leiningen__org_apache_kerby_kerb_core_1_0_1.xml │ ├── Leiningen__org_apache_kerby_kerb_util_1_0_1.xml │ ├── Leiningen__org_apache_solr_solr_core_8_4_1.xml │ ├── Leiningen__org_apache_solr_solr_solrj_8_4_1.xml │ ├── Leiningen__org_clojure_spec_alpha_0_2_176.xml │ ├── Leiningen__org_codehaus_janino_janino_3_0_9.xml │ ├── Leiningen__commons_fileupload_1_3_3.xml │ ├── Leiningen__org_apache_kerby_kerby_asn1_1_0_1.xml │ ├── Leiningen__org_apache_kerby_kerby_pkix_1_0_1.xml │ ├── Leiningen__org_restlet_jee_org_restlet_2_3_0.xml │ ├── Leiningen__org_slf4j_jcl_over_slf4j_1_7_24.xml │ ├── Leiningen__com_jayway_jsonpath_json_path_2_4_0.xml │ ├── Leiningen__commons_collections_3_2_2.xml │ ├── Leiningen__org_antlr_antlr4_runtime_4_5_1_1.xml │ ├── Leiningen__org_apache_commons_commons_exec_1_3.xml │ ├── Leiningen__org_apache_commons_commons_text_1_6.xml │ ├── Leiningen__org_apache_hadoop_hadoop_auth_3_2_0.xml │ ├── Leiningen__org_apache_lucene_lucene_core_8_4_1.xml │ ├── Leiningen__org_apache_lucene_lucene_join_8_4_1.xml │ ├── Leiningen__org_apache_lucene_lucene_misc_8_4_1.xml │ ├── Leiningen__io_netty_netty_buffer_4_1_29_Final.xml │ ├── Leiningen__io_netty_netty_codec_4_1_29_Final.xml │ ├── Leiningen__io_netty_netty_common_4_1_29_Final.xml │ ├── Leiningen__org_apache_zookeeper_zookeeper_3_5_5.xml │ ├── Leiningen__org_codehaus_woodstox_stax2_api_3_1_4.xml │ ├── Leiningen__io_netty_netty_handler_4_1_29_Final.xml │ ├── Leiningen__org_apache_hadoop_hadoop_common_3_2_0.xml │ ├── Leiningen__org_apache_lucene_lucene_codecs_8_4_1.xml │ ├── Leiningen__org_apache_lucene_lucene_memory_8_4_1.xml │ ├── Leiningen__org_clojure_core_specs_alpha_0_2_44.xml │ ├── Leiningen__com_github_zafarkhaja_java_semver_0_9_0.xml │ ├── Leiningen__com_google_protobuf_protobuf_java_3_6_1.xml │ ├── Leiningen__io_dropwizard_metrics_metrics_jmx_4_0_5.xml │ ├── Leiningen__io_dropwizard_metrics_metrics_jvm_4_0_5.xml │ ├── Leiningen__io_netty_netty_resolver_4_1_29_Final.xml │ ├── Leiningen__io_opentracing_opentracing_api_0_33_0.xml │ ├── Leiningen__io_opentracing_opentracing_noop_0_33_0.xml │ ├── Leiningen__io_opentracing_opentracing_util_0_33_0.xml │ ├── Leiningen__javax_servlet_javax_servlet_api_3_1_0.xml │ ├── Leiningen__org_apache_calcite_calcite_core_1_18_0.xml │ ├── Leiningen__org_apache_commons_commons_lang3_3_8_1.xml │ ├── Leiningen__org_apache_commons_commons_math3_3_6_1.xml │ ├── Leiningen__org_apache_httpcomponents_httpmime_4_5_6.xml │ ├── Leiningen__org_apache_lucene_lucene_queries_8_4_1.xml │ ├── Leiningen__org_apache_lucene_lucene_sandbox_8_4_1.xml │ ├── Leiningen__org_apache_lucene_lucene_suggest_8_4_1.xml │ ├── Leiningen__org_locationtech_spatial4j_spatial4j_0_7.xml │ ├── Leiningen__io_dropwizard_metrics_metrics_core_4_0_5.xml │ ├── Leiningen__io_netty_netty_transport_4_1_29_Final.xml │ ├── Leiningen__io_sgr_s2_geometry_library_java_1_0_0.xml │ ├── Leiningen__org_apache_calcite_calcite_linq4j_1_18_0.xml │ ├── Leiningen__org_apache_curator_curator_client_2_13_0.xml │ ├── Leiningen__org_apache_httpcomponents_httpclient_4_5_6.xml │ ├── Leiningen__org_apache_httpcomponents_httpcore_4_4_10.xml │ ├── Leiningen__org_apache_logging_log4j_log4j_api_2_11_2.xml │ ├── Leiningen__org_apache_logging_log4j_log4j_web_2_11_2.xml │ ├── Leiningen__org_apache_lucene_lucene_grouping_8_4_1.xml │ ├── Leiningen__org_apache_lucene_lucene_spatial3d_8_4_1.xml │ ├── Leiningen__com_github_ben_manes_caffeine_caffeine_2_8_0.xml │ ├── Leiningen__io_dropwizard_metrics_metrics_jetty9_4_0_5.xml │ ├── Leiningen__org_apache_curator_curator_recipes_2_13_0.xml │ ├── Leiningen__org_apache_logging_log4j_log4j_core_2_11_2.xml │ ├── Leiningen__org_apache_zookeeper_zookeeper_jute_3_5_5.xml │ ├── Leiningen__net_hydromatic_eigenbase_properties_1_1_5.xml │ ├── Leiningen__org_apache_hadoop_hadoop_annotations_3_2_0.xml │ ├── Leiningen__org_apache_hadoop_hadoop_hdfs_client_3_2_0.xml │ ├── Leiningen__org_apache_lucene_lucene_expressions_8_4_1.xml │ ├── Leiningen__org_apache_lucene_lucene_highlighter_8_4_1.xml │ ├── Leiningen__org_apache_lucene_lucene_queryparser_8_4_1.xml │ ├── Leiningen__org_codehaus_janino_commons_compiler_3_0_9.xml │ ├── Leiningen__com_fasterxml_jackson_core_jackson_core_2_10_0.xml │ ├── Leiningen__io_dropwizard_metrics_metrics_graphite_4_0_5.xml │ ├── Leiningen__org_apache_calcite_avatica_avatica_core_1_13_0.xml │ ├── Leiningen__org_apache_curator_curator_framework_2_13_0.xml │ ├── Leiningen__org_apache_logging_log4j_log4j_1_2_api_2_11_2.xml │ ├── Leiningen__org_eclipse_jetty_jetty_io_9_4_19_v20190610.xml │ ├── Leiningen__org_apache_lucene_lucene_analyzers_nori_8_4_1.xml │ ├── Leiningen__org_apache_lucene_lucene_classification_8_4_1.xml │ ├── Leiningen__org_apache_lucene_lucene_spatial_extras_8_4_1.xml │ ├── Leiningen__org_codehaus_woodstox_woodstox_core_asl_4_4_1.xml │ ├── Leiningen__org_eclipse_jetty_jetty_http_9_4_19_v20190610.xml │ ├── Leiningen__org_eclipse_jetty_jetty_jmx_9_4_19_v20190610.xml │ ├── Leiningen__org_eclipse_jetty_jetty_util_9_4_19_v20190610.xml │ ├── Leiningen__org_eclipse_jetty_jetty_xml_9_4_19_v20190610.xml │ ├── Leiningen__org_apache_logging_log4j_log4j_slf4j_impl_2_11_2.xml │ ├── Leiningen__org_apache_lucene_lucene_backward_codecs_8_4_1.xml │ ├── Leiningen__org_restlet_jee_org_restlet_ext_servlet_2_3_0.xml │ ├── Leiningen__org_apache_commons_commons_configuration2_2_1_1.xml │ ├── Leiningen__org_apache_htrace_htrace_core4_4_1_0_incubating.xml │ ├── Leiningen__org_apache_lucene_lucene_analyzers_common_8_4_1.xml │ ├── Leiningen__org_eclipse_jetty_jetty_client_9_4_19_v20190610.xml │ ├── Leiningen__org_eclipse_jetty_jetty_deploy_9_4_19_v20190610.xml │ ├── Leiningen__org_eclipse_jetty_jetty_server_9_4_19_v20190610.xml │ ├── Leiningen__org_eclipse_jetty_jetty_webapp_9_4_19_v20190610.xml │ ├── Leiningen__com_fasterxml_jackson_core_jackson_databind_2_10_0.xml │ ├── Leiningen__org_eclipse_jetty_jetty_rewrite_9_4_19_v20190610.xml │ ├── Leiningen__org_eclipse_jetty_jetty_servlet_9_4_19_v20190610.xml │ ├── Leiningen__org_apache_lucene_lucene_analyzers_kuromoji_8_4_1.xml │ ├── Leiningen__org_apache_lucene_lucene_analyzers_phonetic_8_4_1.xml │ ├── Leiningen__org_eclipse_jetty_jetty_security_9_4_19_v20190610.xml │ ├── Leiningen__org_eclipse_jetty_jetty_servlets_9_4_19_v20190610.xml │ ├── Leiningen__com_fasterxml_jackson_core_jackson_annotations_2_10_0.xml │ ├── Leiningen__org_eclipse_jetty_http2_http2_hpack_9_4_19_v20190610.xml │ ├── Leiningen__io_netty_netty_transport_native_epoll_4_1_29_Final.xml │ ├── Leiningen__org_eclipse_jetty_http2_http2_client_9_4_19_v20190610.xml │ ├── Leiningen__org_eclipse_jetty_http2_http2_common_9_4_19_v20190610.xml │ ├── Leiningen__org_eclipse_jetty_http2_http2_server_9_4_19_v20190610.xml │ ├── Leiningen__org_eclipse_jetty_jetty_alpn_client_9_4_19_v20190610.xml │ ├── Leiningen__org_eclipse_jetty_jetty_alpn_server_9_4_19_v20190610.xml │ ├── Leiningen__org_eclipse_jetty_jetty_continuation_9_4_19_v20190610.xml │ ├── Leiningen__org_eclipse_jetty_jetty_alpn_java_client_9_4_19_v20190610.xml │ ├── Leiningen__org_eclipse_jetty_jetty_alpn_java_server_9_4_19_v20190610.xml │ ├── Leiningen__io_netty_netty_transport_native_unix_common_4_1_29_Final.xml │ ├── Leiningen__com_fasterxml_jackson_dataformat_jackson_dataformat_smile_2_10_0.xml │ └── Leiningen__org_eclipse_jetty_http2_http2_http_client_transport_9_4_19_v20190610.xml ├── dictionaries │ └── sannsyn.xml ├── misc.xml ├── $PRODUCT_WORKSPACE_FILE$ ├── compiler.xml └── workspace.xml ├── test └── clj │ └── clojureranker │ └── core_test.clj ├── project.clj ├── CHANGELOG.md ├── README.md ├── LICENSE └── clojureranker.iml /src/clj/clojureranker/core.clj: -------------------------------------------------------------------------------- 1 | (ns clojureranker.core 2 | ) 3 | 4 | (defn main [] "hupp") -------------------------------------------------------------------------------- /doc/intro.md: -------------------------------------------------------------------------------- 1 | # Introduction to clj.clojureranker 2 | 3 | TODO: write [great documentation](http://jacobian.org/writing/what-to-write/) 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | /classes 3 | /checkouts 4 | profiles.clj 5 | pom.xml 6 | pom.xml.asc 7 | *.jar 8 | *.class 9 | /.lein-* 10 | /.nrepl-port 11 | .hgignore 12 | .hg/ 13 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/ClojureProjectResolveSettings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | IDE 5 | 6 | -------------------------------------------------------------------------------- /test/clj/clojureranker/core_test.clj: -------------------------------------------------------------------------------- 1 | (ns clojureranker.core-test 2 | (:require [clojure.test :refer :all] 3 | [clojureranker.core :refer :all])) 4 | 5 | (deftest a-test 6 | (testing "FIXME, I fail." 7 | (is (= 0 1)))) 8 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__nrepl_0_7_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__commons_io_2_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_ow2_asm_asm_5_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_rrd4j_rrd4j_3_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__commons_cli_1_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__com_google_re2j_re2j_1_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__com_lmax_disruptor_3_4_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__com_tdunning_t_digest_3_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__commons_codec_1_11.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__com_carrotsearch_hppc_0_8_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_clojure_clojure_1_10_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_ow2_asm_asm_commons_5_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_slf4j_slf4j_api_1_7_24.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_bitbucket_b_c_jose4j_0_6_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__clojure_complete_0_2_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__com_google_guava_guava_25_1_jre.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_apache_kerby_kerb_core_1_0_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_apache_kerby_kerb_util_1_0_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_apache_solr_solr_core_8_4_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_apache_solr_solr_solrj_8_4_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_clojure_spec_alpha_0_2_176.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_codehaus_janino_janino_3_0_9.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__commons_fileupload_1_3_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_apache_kerby_kerby_asn1_1_0_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_apache_kerby_kerby_pkix_1_0_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_restlet_jee_org_restlet_2_3_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_slf4j_jcl_over_slf4j_1_7_24.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__com_jayway_jsonpath_json_path_2_4_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__commons_collections_3_2_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_antlr_antlr4_runtime_4_5_1_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_apache_commons_commons_exec_1_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_apache_commons_commons_text_1_6.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_apache_hadoop_hadoop_auth_3_2_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_apache_lucene_lucene_core_8_4_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_apache_lucene_lucene_join_8_4_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_apache_lucene_lucene_misc_8_4_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__io_netty_netty_buffer_4_1_29_Final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__io_netty_netty_codec_4_1_29_Final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__io_netty_netty_common_4_1_29_Final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_apache_zookeeper_zookeeper_3_5_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_codehaus_woodstox_stax2_api_3_1_4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__io_netty_netty_handler_4_1_29_Final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_apache_hadoop_hadoop_common_3_2_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_apache_lucene_lucene_codecs_8_4_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_apache_lucene_lucene_memory_8_4_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_clojure_core_specs_alpha_0_2_44.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__com_github_zafarkhaja_java_semver_0_9_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__com_google_protobuf_protobuf_java_3_6_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__io_dropwizard_metrics_metrics_jmx_4_0_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__io_dropwizard_metrics_metrics_jvm_4_0_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__io_netty_netty_resolver_4_1_29_Final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__io_opentracing_opentracing_api_0_33_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__io_opentracing_opentracing_noop_0_33_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__io_opentracing_opentracing_util_0_33_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__javax_servlet_javax_servlet_api_3_1_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_apache_calcite_calcite_core_1_18_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_apache_commons_commons_lang3_3_8_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_apache_commons_commons_math3_3_6_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_apache_httpcomponents_httpmime_4_5_6.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_apache_lucene_lucene_queries_8_4_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_apache_lucene_lucene_sandbox_8_4_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_apache_lucene_lucene_suggest_8_4_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_locationtech_spatial4j_spatial4j_0_7.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__io_dropwizard_metrics_metrics_core_4_0_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__io_netty_netty_transport_4_1_29_Final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__io_sgr_s2_geometry_library_java_1_0_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_apache_calcite_calcite_linq4j_1_18_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_apache_curator_curator_client_2_13_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_apache_httpcomponents_httpclient_4_5_6.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_apache_httpcomponents_httpcore_4_4_10.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_apache_logging_log4j_log4j_api_2_11_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_apache_logging_log4j_log4j_web_2_11_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_apache_lucene_lucene_grouping_8_4_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_apache_lucene_lucene_spatial3d_8_4_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__com_github_ben_manes_caffeine_caffeine_2_8_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__io_dropwizard_metrics_metrics_jetty9_4_0_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_apache_curator_curator_recipes_2_13_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_apache_logging_log4j_log4j_core_2_11_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_apache_zookeeper_zookeeper_jute_3_5_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__net_hydromatic_eigenbase_properties_1_1_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_apache_hadoop_hadoop_annotations_3_2_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_apache_hadoop_hadoop_hdfs_client_3_2_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_apache_lucene_lucene_expressions_8_4_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_apache_lucene_lucene_highlighter_8_4_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_apache_lucene_lucene_queryparser_8_4_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_codehaus_janino_commons_compiler_3_0_9.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__com_fasterxml_jackson_core_jackson_core_2_10_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__io_dropwizard_metrics_metrics_graphite_4_0_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_apache_calcite_avatica_avatica_core_1_13_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_apache_curator_curator_framework_2_13_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_apache_logging_log4j_log4j_1_2_api_2_11_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_eclipse_jetty_jetty_io_9_4_19_v20190610.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_apache_lucene_lucene_analyzers_nori_8_4_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_apache_lucene_lucene_classification_8_4_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_apache_lucene_lucene_spatial_extras_8_4_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_codehaus_woodstox_woodstox_core_asl_4_4_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_eclipse_jetty_jetty_http_9_4_19_v20190610.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_eclipse_jetty_jetty_jmx_9_4_19_v20190610.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_eclipse_jetty_jetty_util_9_4_19_v20190610.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_eclipse_jetty_jetty_xml_9_4_19_v20190610.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_apache_logging_log4j_log4j_slf4j_impl_2_11_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_apache_lucene_lucene_backward_codecs_8_4_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_restlet_jee_org_restlet_ext_servlet_2_3_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_apache_commons_commons_configuration2_2_1_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_apache_htrace_htrace_core4_4_1_0_incubating.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_apache_lucene_lucene_analyzers_common_8_4_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_eclipse_jetty_jetty_client_9_4_19_v20190610.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_eclipse_jetty_jetty_deploy_9_4_19_v20190610.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_eclipse_jetty_jetty_server_9_4_19_v20190610.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_eclipse_jetty_jetty_webapp_9_4_19_v20190610.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__com_fasterxml_jackson_core_jackson_databind_2_10_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_eclipse_jetty_jetty_rewrite_9_4_19_v20190610.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_eclipse_jetty_jetty_servlet_9_4_19_v20190610.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/dictionaries/sannsyn.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | clojureranker 5 | hupp 6 | nrepl 7 | petter 8 | rerank 9 | rescore 10 | rescored 11 | rescorer 12 | startnrepl 13 | uberjar 14 | 15 | 16 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_apache_lucene_lucene_analyzers_kuromoji_8_4_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_apache_lucene_lucene_analyzers_phonetic_8_4_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_eclipse_jetty_jetty_security_9_4_19_v20190610.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_eclipse_jetty_jetty_servlets_9_4_19_v20190610.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__com_fasterxml_jackson_core_jackson_annotations_2_10_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_eclipse_jetty_http2_http2_hpack_9_4_19_v20190610.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__io_netty_netty_transport_native_epoll_4_1_29_Final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_eclipse_jetty_http2_http2_client_9_4_19_v20190610.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_eclipse_jetty_http2_http2_common_9_4_19_v20190610.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_eclipse_jetty_http2_http2_server_9_4_19_v20190610.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_eclipse_jetty_jetty_alpn_client_9_4_19_v20190610.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_eclipse_jetty_jetty_alpn_server_9_4_19_v20190610.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_eclipse_jetty_jetty_continuation_9_4_19_v20190610.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/clj/clojureranker/test.clj: -------------------------------------------------------------------------------- 1 | (ns clojureranker.test) 2 | 3 | (defn rescore [score_list] 4 | "this is only a test rescore function" 5 | (map (fn [doc] 6 | (let [old-score (first doc) 7 | lucene-id (second doc) 8 | solr-doc (nth doc 2) 9 | new-score (if (= (.get solr-doc "id") "055357342X") 1 (rand)) 10 | ] 11 | [new-score lucene-id]) 12 | ) score_list) 13 | ) -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_eclipse_jetty_jetty_alpn_java_client_9_4_19_v20190610.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_eclipse_jetty_jetty_alpn_java_server_9_4_19_v20190610.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__io_netty_netty_transport_native_unix_common_4_1_29_Final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__com_fasterxml_jackson_dataformat_jackson_dataformat_smile_2_10_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Leiningen__org_eclipse_jetty_http2_http2_http_client_transport_9_4_19_v20190610.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/$PRODUCT_WORKSPACE_FILE$: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 1.8 8 | 9 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/clj/clojureranker/repl.clj: -------------------------------------------------------------------------------- 1 | (ns clojureranker.repl 2 | (:require [nrepl.server :refer [start-server stop-server]]) 3 | ) 4 | 5 | (def started (atom false)) 6 | (def repl-lock (Object.)) 7 | 8 | (defn startnrepl 9 | "start a repl at port 7888 and make sure that only one repl is started" 10 | [] 11 | (locking repl-lock (when (not @started) 12 | (reset! started true) 13 | (start-server :port 7888) 14 | (reset! started true) 15 | (println "Repl started at port 78888. Enjoy!") 16 | )) 17 | ) -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/java/clojureranker/ClojureUtils.java: -------------------------------------------------------------------------------- 1 | package clojureranker; 2 | 3 | import org.apache.solr.handler.component.ResponseBuilder; 4 | import org.apache.solr.search.DocIterator; 5 | 6 | import java.util.ArrayList; 7 | import java.util.List; 8 | 9 | public class ClojureUtils { 10 | 11 | public static List iterableToList(DocIterator di, int reRankNum) { 12 | List scores = new ArrayList<>(); 13 | int counter = 0; 14 | for (DocIterator docIterator=di; docIterator.hasNext() && 15 | counter < reRankNum; counter++) { 16 | docIterator.next(); 17 | scores.add(docIterator.score()); 18 | } 19 | return scores; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /project.clj: -------------------------------------------------------------------------------- 1 | (defproject clojureranker "0.1.0" 2 | :description "Rescore Solr scores with clojure" 3 | :url "https://github.com/pegesund/clojureranker" 4 | :license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0" 5 | :url "https://www.eclipse.org/legal/epl-2.0/"} 6 | :dependencies [[org.clojure/clojure "1.10.0"] 7 | [org.apache.solr/solr-core "8.4.1"] 8 | [nrepl "0.7.0"] 9 | ] 10 | :repl-options {:init-ns clojureranker.core} 11 | :prep-tasks ["javac"] 12 | :main clojureranker.solr 13 | :source-paths ["src/clj"] 14 | :jar-exclusions [#"clojure-1.10.1.*"] 15 | :java-source-paths ["src/java"] 16 | :javac-options ["-target" "1.8" "-source" "1.8" "-Xlint:-options"] 17 | ) 18 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | All notable changes to this project will be documented in this file. This change log follows the conventions of [keepachangelog.com](http://keepachangelog.com/). 3 | 4 | ## [Unreleased] 5 | ### Changed 6 | - Add a new arity to `make-widget-async` to provide a different widget shape. 7 | 8 | ## [0.1.1] - 2020-03-21 9 | ### Changed 10 | - Documentation on how to make the widgets. 11 | 12 | ### Removed 13 | - `make-widget-sync` - we're all async, all the time. 14 | 15 | ### Fixed 16 | - Fixed widget maker to keep working when daylight savings switches over. 17 | 18 | ## 0.1.0 - 2020-03-21 19 | ### Added 20 | - Files from the new template. 21 | - Widget maker public API - `make-widget-sync`. 22 | 23 | [Unreleased]: https://github.com/your-name/clj.clojureranker/compare/0.1.1...HEAD 24 | [0.1.1]: https://github.com/your-name/clj.clojureranker/compare/0.1.0...0.1.1 25 | -------------------------------------------------------------------------------- /src/clj/clojureranker/request.clj: -------------------------------------------------------------------------------- 1 | (ns clojureranker.request 2 | (:require [clojure.java.io :as io]) 3 | (:import (org.apache.solr.handler RequestHandlerUtils) 4 | (org.apache.solr.common.params CommonParams) 5 | (java.net URI) 6 | (java.io BufferedReader InputStreamReader))) 7 | 8 | (defn request-real [req resp] 9 | (let [call (.getHttpSolrCall req) 10 | r (.getReq call) 11 | input-stream (.getInputStream r) 12 | ] 13 | (RequestHandlerUtils/setWt req CommonParams/JSON) 14 | (println (.getContentStreams req)) 15 | ) 16 | ) 17 | 18 | 19 | (defn request 20 | "This function is a boilerplate for writing request handlers in an clojure environment. 21 | Put your code inside the try.." 22 | [req resp] 23 | (try 24 | (request-real req resp) 25 | (catch Exception e 26 | (clojure.stacktrace/print-stack-trace e) 27 | )) 28 | ) 29 | 30 | 31 | -------------------------------------------------------------------------------- /src/java/clojureranker/Rescorer.java: -------------------------------------------------------------------------------- 1 | package clojureranker; 2 | 3 | import clojure.java.api.Clojure; 4 | import clojure.lang.IFn; 5 | import org.apache.solr.common.util.NamedList; 6 | import org.apache.solr.core.SolrConfig; 7 | import org.apache.solr.handler.component.ResponseBuilder; 8 | import org.apache.solr.handler.component.SearchComponent; 9 | import org.apache.solr.search.DocList; 10 | import org.apache.solr.search.DocListAndSet; 11 | 12 | 13 | import java.io.IOException; 14 | 15 | public class Rescorer extends SearchComponent { 16 | 17 | IFn prepare; 18 | IFn process; 19 | 20 | @Override 21 | public void init(NamedList args) { 22 | super.init(args); 23 | Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader()); 24 | IFn require = Clojure.var("clojure.core", "require"); 25 | require.invoke(Clojure.read("clojureranker.solr")); 26 | prepare = Clojure.var("clojureranker.solr", "prepare"); 27 | process = Clojure.var("clojureranker.solr", "process"); 28 | IFn init = Clojure.var("clojureranker.solr", "init"); 29 | init.invoke(args); 30 | 31 | } 32 | 33 | @Override 34 | public void prepare(ResponseBuilder responseBuilder) throws IOException { 35 | prepare.invoke(responseBuilder, this.getName()); 36 | 37 | } 38 | 39 | @Override 40 | public void process(ResponseBuilder responseBuilder) throws IOException { 41 | process.invoke(responseBuilder, this.getName()); 42 | } 43 | 44 | @Override 45 | public String getDescription() { 46 | return "A solr rescorer plugin"; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/java/clojureranker/ClojureRequest.java: -------------------------------------------------------------------------------- 1 | package clojureranker; 2 | 3 | import clojure.java.api.Clojure; 4 | import clojure.lang.IFn; 5 | import org.apache.solr.common.util.IOUtils; 6 | import org.apache.solr.common.util.NamedList; 7 | import org.apache.solr.core.SolrCore; 8 | import org.apache.solr.handler.RequestHandlerBase; 9 | import org.apache.solr.request.SolrQueryRequest; 10 | import org.apache.solr.response.SolrQueryResponse; 11 | import org.apache.solr.search.DocListAndSet; 12 | 13 | import javax.net.ssl.HttpsURLConnection; 14 | import java.io.BufferedReader; 15 | import java.io.IOException; 16 | import java.io.InputStreamReader; 17 | import java.net.MalformedURLException; 18 | import java.net.SocketTimeoutException; 19 | import java.net.URL; 20 | import java.net.URLConnection; 21 | 22 | public class ClojureRequest extends RequestHandlerBase { 23 | 24 | IFn handle; 25 | 26 | @Override 27 | public void init(NamedList args) { 28 | super.init(args); 29 | IFn require = Clojure.var("clojure.core", "require"); 30 | require.invoke(Clojure.read("clojureranker.request")); 31 | Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader()); 32 | System.out.println("--- Initializing"); 33 | } 34 | 35 | 36 | @Override 37 | public void handleRequestBody(SolrQueryRequest solrQueryRequest, SolrQueryResponse solrQueryResponse) throws Exception { 38 | System.out.println("--- content-streams: " + solrQueryRequest.getContentStreams()); 39 | System.out.println("Got a request handler.."); 40 | handle = Clojure.var("clojureranker.request", "request"); 41 | handle.invoke(solrQueryRequest, solrQueryResponse); 42 | 43 | } 44 | 45 | @Override 46 | public String getDescription() { 47 | return null; 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /src/clj/clojureranker/solr.clj: -------------------------------------------------------------------------------- 1 | (ns clojureranker.solr 2 | (:require [nrepl.server :refer [start-server stop-server]] 3 | [clojureranker.repl]) 4 | (:import (org.apache.solr.search SolrIndexSearcher DocListAndSet DocSlice) 5 | (clojureranker ClojureUtils) 6 | (org.apache.solr.response BasicResultContext))) 7 | 8 | 9 | (def rescore-default (atom false)) 10 | (defonce functions (atom {})) 11 | (defonce tops (atom {})) 12 | (defonce ids (atom {})) 13 | (defonce current-init (atom nil)) 14 | 15 | 16 | (defn rescore? [rb] 17 | (or @rescore-default 18 | (= "true" (.get (.getParams (.req rb)) "rescore")))) 19 | 20 | (defn init 21 | "Set init values" 22 | [args] 23 | (when args (reset! current-init (.get args "defaults"))) 24 | (let [default (if args (.get args "defaults") @current-init) 25 | do-start-repl (.getBooleanArg default "start-nrepl") 26 | do-rescore-default (.getBooleanArg default "rescore") 27 | name (.get default "searchComponentName") 28 | a-require (.get default "require") 29 | a-load-file (.get default "load-file") 30 | a-function (.get default "function") 31 | top (or (.get default "top") 50) 32 | id-field (or (.get default "id") "id") 33 | ] 34 | (when do-rescore-default (reset! rescore-default true)) 35 | (when a-require (require (symbol a-require))) 36 | (when a-load-file (load-file a-load-file)) 37 | (when do-start-repl 38 | (clojureranker.repl/startnrepl) 39 | ) 40 | (when a-function 41 | (let [fun (resolve (symbol a-function))] 42 | (swap! functions assoc name fun))) 43 | (swap! tops assoc name top) 44 | (swap! ids assoc name id-field))) 45 | 46 | ; redirect print to repl (alter-var-root #'*out* (constantly *out*)) 47 | 48 | (defn prepare [rb name] 49 | (when (rescore? rb) 50 | (let [params (.getParams (.req rb)) 51 | sortSpec (.getSortSpec rb) 52 | offset (.getOffset sortSpec) 53 | top (.get @tops name) 54 | ] 55 | (when (> top offset) 56 | (.setCount sortSpec top) 57 | (.setOffset sortSpec 0) 58 | (when (= "true" (.get params "rescore")) 59 | (.setFieldFlags rb SolrIndexSearcher/GET_SCORES)))))) 60 | 61 | (defn return-new-result 62 | "Pass scored must be a list of [[lucene-id score] [lucene-id score]... ]" 63 | [rb scored-results] 64 | (let [unzipped-score (apply map vector scored-results) 65 | scores (into-array Float/TYPE (first unzipped-score)) 66 | lucene-docs (into-array Integer/TYPE (second unzipped-score)) 67 | doc-list (.docList (.getResults rb)) 68 | matches (.matches doc-list) 69 | max-score (.maxScore doc-list) 70 | new-offset (.offset doc-list) 71 | len (count lucene-docs) 72 | dls (DocListAndSet.) 73 | doc-slice (DocSlice. new-offset len lucene-docs scores matches max-score) 74 | ] 75 | (set! (.docList dls) doc-slice) 76 | (.setResults rb dls) 77 | (let [result-context (BasicResultContext. rb) 78 | response (.rsp rb)] 79 | (-> response (.getValues) (.removeAll "response") ) 80 | (.addResponse response result-context)))) 81 | 82 | (defn process [rb name] 83 | "Get results, rescore and serve new results with new scoring" 84 | (when (rescore? rb) (let [ 85 | params (.getParams (.req rb)) 86 | offset (Integer. (or (.get params "start") 0)) 87 | rows (if-let [r (.get params "rows")] (Long. r)) 88 | searcher (.getSearcher (.req rb)) 89 | top (.get @tops name) 90 | ] 91 | (when (>= top offset) 92 | (let [initialSearchResult (.docList (.getResults rb)) 93 | score (seq (ClojureUtils/iterableToList (.iterator initialSearchResult) top)) 94 | lucene-docs (iterator-seq (.iterator initialSearchResult)) 95 | id-field-set #{(.get @ids name)} 96 | solr-docs (map #(.doc searcher % id-field-set) lucene-docs) 97 | composed-list (map vector score lucene-docs solr-docs) 98 | the-rescore-function (.get @functions name) 99 | rescored-list (sort #(compare (first %2) (first %1)) 100 | (apply the-rescore-function [composed-list])) 101 | result (if rows (take rows rescored-list) rescored-list) 102 | ] 103 | (return-new-result rb result)))))) -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # clj.clojureranker 2 | 3 | - Rescore Solr scoring functions with clojure functions 4 | - Connect to nRepl for fast development cycle 5 | - Use the whole Clojure ecosystem while rescoring 6 | - Build Solr plugins without repacking jars and restarting Solr all the time 7 | 8 | 9 | ## Usage 10 | 11 | You can write clojure functions to rescore the Solr results. 12 | 13 | It rescores only the n-top results in the query, the top-parameter defines how many to rescore 14 | 15 | It should be pretty fast to start going 16 | 17 | - Checkout this project and run: lein uberjar 18 | - Copy the uberjar in the target dir into solr classpath 19 | - If you put the jar in solr/lib add startup="lazy" to you requesthandler 20 | - I normally put the jar in the core-dir/lib (you will have to create this dir) 21 | - If one use the solr-config below you will be up and running default rescorer, which rescores random 22 | - Create your own leiningen project and add to solr classpath, this should contain the new rescore function or just keep working on this leiningen project 23 | - Update the solr config with require and config to reach the new rescore function 24 | 25 | ### Even simpler distribution 26 | 27 | If you think creating a leiningen project is overkill, you can also do use the "load-file" parameter which should point to an absolute file path. 28 | 29 | The plugin will the a load-file on this file at startup. 30 | 31 | ### Solr configuration 32 | 33 | ```xml 34 | 35 | 36 | true 37 | cselect 38 | clojureranker.test 39 | clojureranker.test/rescore 40 | 30 41 | 42 | 43 | ``` 44 | 45 | Then add this lines to your request handler to activate the component: 46 | 47 | ```xml 48 | 49 | cselect 50 | 51 | ``` 52 | 53 | Note: 54 | 55 | - You need to repeat the searchcomponent-name in the defaults config (like above) 56 | - Start repl with the start-nrepl-param. Only one repl will be started pr. solr instance 57 | - You can have different search-components if you need different rescore-functions on different cores 58 | 59 | ### Rescore function 60 | 61 | Example on the look of a rescore function: 62 | 63 | ```clojure 64 | 65 | (defn rescore [score_list] 66 | "this is only a test rescore function" 67 | (map (fn [doc] 68 | (let [old-score (first doc) 69 | lucene-id (second doc) 70 | solr-doc (nth doc 2) 71 | new-score (if (= (.get solr-doc "id") "055357342X") 1 (rand)) 72 | ] 73 | [new-score lucene-id]) 74 | ) score_list) 75 | ) 76 | 77 | ``` 78 | The input to the rescore function is a list of lists like this 79 | 80 | ```clojure 81 | [[score lucene-id solr-doc] [score lucene-id solr-doc] [score lucene-id solr-doc] ...] 82 | ``` 83 | 84 | The return of the function must be a list of type 85 | 86 | ```clojure 87 | [[new-score lucene-id] [new-score lucene-id] [new-score lucene-id] ...] 88 | ``` 89 | To note: 90 | - Sorting will be handled by the framework, you just provide the new score 91 | - All solr fields are available with the get-function above 92 | - In the example above I just random score all hits, except if the id is 055357342X. Then I score this to 1, so this should always be on the top. 93 | 94 | 95 | ## nRepl 96 | 97 | Repl is started at 7888, connect with your favorite editor and recompile and test out on the fly. 98 | There is no long restart, packing cycles, but when you require new packages in the project file you will have to rebuid and restart solr. 99 | 100 | The repl should off course only be run in debug environments, as it is a loaded gun :) 101 | 102 | ## Speed 103 | 104 | It is pretty fast and I cant hardly notice the difference between a normal solr query and a rescored one. 105 | 106 | But if you do heavy stuff, like getting info through http-requests and/or heavy vector calculations response time will probably rise. 107 | 108 | ## Contributions and feedback 109 | 110 | is of course welcome. Just drop create a pull request and drop me a note. 111 | 112 | ## TellusR 113 | 114 | My company, [Sannsyn](https://sannsyn.com), is working on a plugin called TellusR to do stuff like this in Solr: 115 | 116 | - AB-testing directly in Solr 117 | - Boosting, tuning based on ai 118 | - Personalization based on semantic and/or click/purchase info 119 | - Statistics to see how the search is used: 120 | - Most used terms 121 | - Trending stuff 122 | - Which stuff converts best to click/buys 123 | - Find which articles are never shown in hit lists 124 | - Find articles which are shown, but does not convert 125 | - Number of zero-hits, how these trends and which terms these are 126 | - Avg hits pr day, distribution through time and so on 127 | - Response time 128 | - Request times 129 | - We use smart algorithms and anomaly detections to warn you about trouble 130 | - Gui to synonyms, elevation and advanced boosting rules 131 | - More features coming :) 132 | 133 | We also adopt the plugin for larger customer if needed. 134 | 135 | Parts of this will be open source, stay tuned or if you are interested, just drop us a line to get some early info 136 | 137 | ## Embedding and boostrapping the clojure interpreter 138 | 139 | This line did cost me my last non-grey hair straw, but it made me available to embed and boostrap the clojure interpreter from Solr: 140 | 141 | 142 | ```clojure 143 | Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader()); 144 | ``` 145 | 146 | I mention here specifically as I might save some work for someone else. 147 | 148 | Drop me a line if you have an alternative approach. 149 | 150 | ## Solr versions 151 | 152 | This plugin is compiled against solr 8.4.1-core. Chances are good that it will work out of the box with newer/older versions as well. 153 | 154 | But if you would like to be certain, just checkout and change the 8.4.1 in the project-file to your solr version and the run: 155 | 156 | lein uberjar 157 | 158 | The new jar to add to Solr will be in the target-dir 159 | 160 | ## Credits 161 | 162 | This plugin is loosely based on info in [this article](https://tech.finn.no/2018/04/10/personalized-search/) 163 | 164 | Thanks for for open sourcing! 165 | 166 | 167 | ## License 168 | 169 | Copyright © 2020 Petter Egesund and Sannsyn 170 | 171 | This program and the accompanying materials are made available under the 172 | terms of the Eclipse Public License 2.0 which is available at 173 | http://www.eclipse.org/legal/epl-2.0. 174 | 175 | This Source Code may also be made available under the following Secondary 176 | Licenses when the conditions for such availability set forth in the Eclipse 177 | Public License, v. 2.0 are satisfied: GNU General Public License as published by 178 | the Free Software Foundation, either version 2 of the License, or (at your 179 | option) any later version, with the GNU Classpath Exception which is available 180 | at https://www.gnu.org/software/classpath/license.html. 181 | -------------------------------------------------------------------------------- /.idea/workspace.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 17 | 18 | 24 | 25 | 26 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | {:repl-history {:ide [], :local [{:command "(java.lang.String.\n )", :offset 22, :ns "clojureranker.core"} {:command "(clojureranker.solr.ClojureRanker.)", :offset 35, :ns "clojureranker.core"} {:command "(System/getProperty \"java.version\")", :offset 35, :ns "clojureranker.core"} {:command "(clojureranker.solr.)", :offset 21, :ns "clojureranker.core"} {:command "type ", :offset 5} {:command "(type (clojureranker.solr.))", :offset 28, :ns "clojureranker.core"} {:command "(type (clojureranker.Solr.))", :offset 28, :ns "clojureranker.core"} {:command "(clojureranker.Solr)", :offset 20, :ns "clojureranker.core"} {:command "(clojureranker.Solr.)", :offset 21, :ns "clojureranker.core"} {:command "(ClojureRanker.)", :offset 16, :ns "clojureranker.core"} {:command "(.init (ClojureRanker.) \"hupp\")", :offset 31, :ns "clojureranker.core"} {:command "r", :offset 1, :ns "clojureranker.core"} {:command "(.init r \"hupp\")", :offset 16, :ns "clojureranker.core"} {:command "(.-init r \"hupp\")", :offset 17, :ns "clojureranker.core"} {:command "(.getDescription r)", :offset 19, :ns "clojureranker.core"} {:command "(.init r 88)", :offset 12, :ns "clojureranker.core"} {:command "(.-init r 88)", :offset 13, :ns "clojureranker.core"} {:command "(.init r)", :offset 9, :ns "clojureranker.core"} {:command "(.init r [8 9])", :offset 15, :ns "clojureranker.core"} {:command "(doseq [m (.getMethods (type r))]\n (println \"Method Name: \" (.getName m))\n (println \"Return Type: \" (.getReturnType m) \"\\n\"))", :offset 127, :ns "clojureranker.core"} {:command "(.huppx r)", :offset 10, :ns "clojureranker.core"} {:command "(.hupp r)", :offset 9, :ns "clojureranker.core"} {:command "(def r (ClojureRanker.))", :offset 24, :ns "clojureranker.core"} {:command "(.hupp r \"hey\")", :offset 15, :ns "clojureranker.core"}], :remote [{:command "(1 + 2)", :offset 7, :ns "user"} {:command "(nil or 0)", :offset 10, :ns "user"} {:command "(or nil 0)", :offset 10, :ns "user"} {:command "(or 8 0)", :offset 8, :ns "user"} {:command "(when (> 10 5) (println \"hyes\"))", :offset 32, :ns "user"} {:command "(let [x 10 y 5] (println (< x y)))", :offset 34, :ns "user"} {:command "(let [x 10 y 5] (println (< y x)))", :offset 34, :ns "user"} {:command "(Integer \"88\")", :offset 14, :ns "user"} {:command "(Integer. \"88\")", :offset 15, :ns "user"} {:command "(Integer. \"88x\")", :offset 16, :ns "user"} {:command "(map vector '(1 2 3) '(4 5 6))", :offset 30, :ns "user"} {:command "(map vector '(1 2 3) '(4 5 6) '(7 8 9))", :offset 39, :ns "user"} {:command "(map vector '(1 2 3) '(4 5 6) [ 7 8 9])", :offset 39, :ns "user"} {:command "(* [1 2 3] [4 5 6])", :offset 19, :ns "user"} {:command "(rang 5)", :offset 8, :ns "user"} {:command "(range 5)", :offset 9, :ns "user"} {:command "(list (* 1 3))", :offset 14, :ns "user"} {:command "(shuffle [1 2 3 4 5])", :offset 21, :ns "user"} {:command "(into-array Long (shuffle [1 2 3 4 5]))", :offset 39, :ns "user"} {:command "(into-array Long/TYPE (shuffle [1 2 3 4 5]))", :offset 44, :ns "user"} {:command "(apply map vector [[1, \"a\"], [2, \"b\"], [3, \"c\"]])", :offset 49, :ns "user"} {:command "(apply map vector [[1 \"a\"] [2 \"b\"] [3 \"c\"]])", :offset 44, :ns "user"} {:command "(apply map vector [[1 \"a\" 33] [2 \"b\" 44] [3 \"c\" 55]])", :offset 53, :ns "user"} {:command "(print \"hUPP\")", :offset 14, :ns "user"} {:command "(clojure.tools.nrepl.middleware.print/print \"Hupp\")", :offset 51, :ns "hUPP"} {:command "(clojure.tools.nrepl/message \"hupp\")", :offset 36, :ns "hUPP"} {:command "(random 1)", :offset 10, :ns "hUPP"} {:command "(third [1 2 3])", :offset 15, :ns "user"} {:command "(nth [1 2 3] 2)", :offset 15, :ns "user"} {:command "(rand)", :offset 6, :ns "user"} {:command "(load \"petter\")", :offset 15, :ns "user"} {:command "(load-file \"~/dev/solr/solr-8.4.1/server/lib/petter\")", :offset 53, :ns "user"} {:command "(load-file \"~/dev/solr/solr-8.4.1/server/lib/petter.clj\")", :offset 57, :ns "user"} {:command "(load-file \"/home/sannsyn/dev/solr/solr-8.4.1/server/lib/petter.clj\")", :offset 69, :ns "user"} {:command "(petter)", :offset 8, :ns "user"} {:command "(if \"hupp\" 1 2) ", :offset 16, :ns "user"} {:command "(def xx (atom false))", :offset 21, :ns "user"} {:command "@current-init", :offset 13, :ns "clojureranker.solr"} {:command "(load \"solr.clj\")", :offset 17, :ns "clojureranker.solr"} {:command "(load \"clojureranker.solr\")", :offset 27, :ns "clojureranker.solr"} {:command "(load \"/clojureranker.solr\")", :offset 28, :ns "clojureranker.solr"} {:command "(require clojureranker.solr)", :offset 28, :ns "clojureranker.solr"} {:command "(require 'clojureranker.solr)", :offset 29, :ns "clojureranker.solr"} {:command "(require 'clojureranker.solr :verbose)", :offset 38, :ns "clojureranker.solr"} {:command "(require 'clojureranker.solrx)", :offset 30, :ns "clojureranker.solr"} {:command "(require (symbol clojureranker.solr))", :offset 37, :ns "clojureranker.solr"} {:command "(require (symbol \"clojureranker.solr\"))", :offset 39, :ns "clojureranker.solr"} {:command "(init nil)", :offset 10, :ns "clojureranker.solr"} {:command "(symbol \"clojureranker.solr.rescore\")", :offset 37, :ns "clojureranker.solr"} {:command "(resolve (symbol \"clojureranker.solr.rescore\"))", :offset 47, :ns "clojureranker.solr"} {:command "(resolve (symbol \"rescore\"))", :offset 28, :ns "clojureranker.solr"} {:command "(resolve (symbol \"clojureranker.solr/rescore\"))", :offset 47, :ns "clojureranker.solr"} {:command "@functions", :offset 10, :ns "clojureranker.solr"} {:command "(ns clojureranker.solr)", :offset 23, :ns "user"} {:command "@tops", :offset 5, :ns "clojureranker.solr"} {:command "(tak 0 [1 2 23])", :offset 16, :ns "clojureranker.solr"} {:command "(take 0 [1 2 23])", :offset 17, :ns "clojureranker.solr"} {:command "(Long. nil)", :offset 11, :ns "clojureranker.solr"} {:command "(Long.)", :offset 7, :ns "clojureranker.solr"} {:command "(Long. 88)", :offset 10, :ns "clojureranker.solr"} {:command "(7 0 /)", :offset 7, :ns "user"} {:command "(nrepl.middleware.print/*stream?*)", :offset 34, :ns "user"} {:command "*out*", :offset 5, :ns "user"} {:command "(alter-var-root #*out* (constantly *out*))", :offset 42, :ns "user"} {:command "(alter-var-root #'*err* (constantly *err*))", :offset 43, :ns "user"} {:command "(System/setErr *err*)", :offset 21, :ns "user"} {:command "*err*", :offset 5, :ns "user"} {:command "(System/setErr (print-stream *err*))", :offset 36, :ns "user"} {:command "(PrintStream. *err*)", :offset 20, :ns "user"} {:command "(+ 1 2)", :offset 7, :ns "user"} {:command "(+ 1 2 )", :offset 8, :ns "user"} {:command "(alter-var-root #'*out* (constantly *out*))", :offset 43, :ns "user"}]}} 38 | 39 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 1584814090320 105 | 110 | 111 | 112 | 113 | 115 | 116 | 125 | 126 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Eclipse Public License - v 2.0 2 | 3 | THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE 4 | PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION 5 | OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. 6 | 7 | 1. DEFINITIONS 8 | 9 | "Contribution" means: 10 | 11 | a) in the case of the initial Contributor, the initial content 12 | Distributed under this Agreement, and 13 | 14 | b) in the case of each subsequent Contributor: 15 | i) changes to the Program, and 16 | ii) additions to the Program; 17 | where such changes and/or additions to the Program originate from 18 | and are Distributed by that particular Contributor. A Contribution 19 | "originates" from a Contributor if it was added to the Program by 20 | such Contributor itself or anyone acting on such Contributor's behalf. 21 | Contributions do not include changes or additions to the Program that 22 | are not Modified Works. 23 | 24 | "Contributor" means any person or entity that Distributes the Program. 25 | 26 | "Licensed Patents" mean patent claims licensable by a Contributor which 27 | are necessarily infringed by the use or sale of its Contribution alone 28 | or when combined with the Program. 29 | 30 | "Program" means the Contributions Distributed in accordance with this 31 | Agreement. 32 | 33 | "Recipient" means anyone who receives the Program under this Agreement 34 | or any Secondary License (as applicable), including Contributors. 35 | 36 | "Derivative Works" shall mean any work, whether in Source Code or other 37 | form, that is based on (or derived from) the Program and for which the 38 | editorial revisions, annotations, elaborations, or other modifications 39 | represent, as a whole, an original work of authorship. 40 | 41 | "Modified Works" shall mean any work in Source Code or other form that 42 | results from an addition to, deletion from, or modification of the 43 | contents of the Program, including, for purposes of clarity any new file 44 | in Source Code form that contains any contents of the Program. Modified 45 | Works shall not include works that contain only declarations, 46 | interfaces, types, classes, structures, or files of the Program solely 47 | in each case in order to link to, bind by name, or subclass the Program 48 | or Modified Works thereof. 49 | 50 | "Distribute" means the acts of a) distributing or b) making available 51 | in any manner that enables the transfer of a copy. 52 | 53 | "Source Code" means the form of a Program preferred for making 54 | modifications, including but not limited to software source code, 55 | documentation source, and configuration files. 56 | 57 | "Secondary License" means either the GNU General Public License, 58 | Version 2.0, or any later versions of that license, including any 59 | exceptions or additional permissions as identified by the initial 60 | Contributor. 61 | 62 | 2. GRANT OF RIGHTS 63 | 64 | a) Subject to the terms of this Agreement, each Contributor hereby 65 | grants Recipient a non-exclusive, worldwide, royalty-free copyright 66 | license to reproduce, prepare Derivative Works of, publicly display, 67 | publicly perform, Distribute and sublicense the Contribution of such 68 | Contributor, if any, and such Derivative Works. 69 | 70 | b) Subject to the terms of this Agreement, each Contributor hereby 71 | grants Recipient a non-exclusive, worldwide, royalty-free patent 72 | license under Licensed Patents to make, use, sell, offer to sell, 73 | import and otherwise transfer the Contribution of such Contributor, 74 | if any, in Source Code or other form. This patent license shall 75 | apply to the combination of the Contribution and the Program if, at 76 | the time the Contribution is added by the Contributor, such addition 77 | of the Contribution causes such combination to be covered by the 78 | Licensed Patents. The patent license shall not apply to any other 79 | combinations which include the Contribution. No hardware per se is 80 | licensed hereunder. 81 | 82 | c) Recipient understands that although each Contributor grants the 83 | licenses to its Contributions set forth herein, no assurances are 84 | provided by any Contributor that the Program does not infringe the 85 | patent or other intellectual property rights of any other entity. 86 | Each Contributor disclaims any liability to Recipient for claims 87 | brought by any other entity based on infringement of intellectual 88 | property rights or otherwise. As a condition to exercising the 89 | rights and licenses granted hereunder, each Recipient hereby 90 | assumes sole responsibility to secure any other intellectual 91 | property rights needed, if any. For example, if a third party 92 | patent license is required to allow Recipient to Distribute the 93 | Program, it is Recipient's responsibility to acquire that license 94 | before distributing the Program. 95 | 96 | d) Each Contributor represents that to its knowledge it has 97 | sufficient copyright rights in its Contribution, if any, to grant 98 | the copyright license set forth in this Agreement. 99 | 100 | e) Notwithstanding the terms of any Secondary License, no 101 | Contributor makes additional grants to any Recipient (other than 102 | those set forth in this Agreement) as a result of such Recipient's 103 | receipt of the Program under the terms of a Secondary License 104 | (if permitted under the terms of Section 3). 105 | 106 | 3. REQUIREMENTS 107 | 108 | 3.1 If a Contributor Distributes the Program in any form, then: 109 | 110 | a) the Program must also be made available as Source Code, in 111 | accordance with section 3.2, and the Contributor must accompany 112 | the Program with a statement that the Source Code for the Program 113 | is available under this Agreement, and informs Recipients how to 114 | obtain it in a reasonable manner on or through a medium customarily 115 | used for software exchange; and 116 | 117 | b) the Contributor may Distribute the Program under a license 118 | different than this Agreement, provided that such license: 119 | i) effectively disclaims on behalf of all other Contributors all 120 | warranties and conditions, express and implied, including 121 | warranties or conditions of title and non-infringement, and 122 | implied warranties or conditions of merchantability and fitness 123 | for a particular purpose; 124 | 125 | ii) effectively excludes on behalf of all other Contributors all 126 | liability for damages, including direct, indirect, special, 127 | incidental and consequential damages, such as lost profits; 128 | 129 | iii) does not attempt to limit or alter the recipients' rights 130 | in the Source Code under section 3.2; and 131 | 132 | iv) requires any subsequent distribution of the Program by any 133 | party to be under a license that satisfies the requirements 134 | of this section 3. 135 | 136 | 3.2 When the Program is Distributed as Source Code: 137 | 138 | a) it must be made available under this Agreement, or if the 139 | Program (i) is combined with other material in a separate file or 140 | files made available under a Secondary License, and (ii) the initial 141 | Contributor attached to the Source Code the notice described in 142 | Exhibit A of this Agreement, then the Program may be made available 143 | under the terms of such Secondary Licenses, and 144 | 145 | b) a copy of this Agreement must be included with each copy of 146 | the Program. 147 | 148 | 3.3 Contributors may not remove or alter any copyright, patent, 149 | trademark, attribution notices, disclaimers of warranty, or limitations 150 | of liability ("notices") contained within the Program from any copy of 151 | the Program which they Distribute, provided that Contributors may add 152 | their own appropriate notices. 153 | 154 | 4. COMMERCIAL DISTRIBUTION 155 | 156 | Commercial distributors of software may accept certain responsibilities 157 | with respect to end users, business partners and the like. While this 158 | license is intended to facilitate the commercial use of the Program, 159 | the Contributor who includes the Program in a commercial product 160 | offering should do so in a manner which does not create potential 161 | liability for other Contributors. Therefore, if a Contributor includes 162 | the Program in a commercial product offering, such Contributor 163 | ("Commercial Contributor") hereby agrees to defend and indemnify every 164 | other Contributor ("Indemnified Contributor") against any losses, 165 | damages and costs (collectively "Losses") arising from claims, lawsuits 166 | and other legal actions brought by a third party against the Indemnified 167 | Contributor to the extent caused by the acts or omissions of such 168 | Commercial Contributor in connection with its distribution of the Program 169 | in a commercial product offering. The obligations in this section do not 170 | apply to any claims or Losses relating to any actual or alleged 171 | intellectual property infringement. In order to qualify, an Indemnified 172 | Contributor must: a) promptly notify the Commercial Contributor in 173 | writing of such claim, and b) allow the Commercial Contributor to control, 174 | and cooperate with the Commercial Contributor in, the defense and any 175 | related settlement negotiations. The Indemnified Contributor may 176 | participate in any such claim at its own expense. 177 | 178 | For example, a Contributor might include the Program in a commercial 179 | product offering, Product X. That Contributor is then a Commercial 180 | Contributor. If that Commercial Contributor then makes performance 181 | claims, or offers warranties related to Product X, those performance 182 | claims and warranties are such Commercial Contributor's responsibility 183 | alone. Under this section, the Commercial Contributor would have to 184 | defend claims against the other Contributors related to those performance 185 | claims and warranties, and if a court requires any other Contributor to 186 | pay any damages as a result, the Commercial Contributor must pay 187 | those damages. 188 | 189 | 5. NO WARRANTY 190 | 191 | EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT 192 | PERMITTED BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN "AS IS" 193 | BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR 194 | IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF 195 | TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR 196 | PURPOSE. Each Recipient is solely responsible for determining the 197 | appropriateness of using and distributing the Program and assumes all 198 | risks associated with its exercise of rights under this Agreement, 199 | including but not limited to the risks and costs of program errors, 200 | compliance with applicable laws, damage to or loss of data, programs 201 | or equipment, and unavailability or interruption of operations. 202 | 203 | 6. DISCLAIMER OF LIABILITY 204 | 205 | EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT 206 | PERMITTED BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS 207 | SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 208 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST 209 | PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 210 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 211 | ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE 212 | EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE 213 | POSSIBILITY OF SUCH DAMAGES. 214 | 215 | 7. GENERAL 216 | 217 | If any provision of this Agreement is invalid or unenforceable under 218 | applicable law, it shall not affect the validity or enforceability of 219 | the remainder of the terms of this Agreement, and without further 220 | action by the parties hereto, such provision shall be reformed to the 221 | minimum extent necessary to make such provision valid and enforceable. 222 | 223 | If Recipient institutes patent litigation against any entity 224 | (including a cross-claim or counterclaim in a lawsuit) alleging that the 225 | Program itself (excluding combinations of the Program with other software 226 | or hardware) infringes such Recipient's patent(s), then such Recipient's 227 | rights granted under Section 2(b) shall terminate as of the date such 228 | litigation is filed. 229 | 230 | All Recipient's rights under this Agreement shall terminate if it 231 | fails to comply with any of the material terms or conditions of this 232 | Agreement and does not cure such failure in a reasonable period of 233 | time after becoming aware of such noncompliance. If all Recipient's 234 | rights under this Agreement terminate, Recipient agrees to cease use 235 | and distribution of the Program as soon as reasonably practicable. 236 | However, Recipient's obligations under this Agreement and any licenses 237 | granted by Recipient relating to the Program shall continue and survive. 238 | 239 | Everyone is permitted to copy and distribute copies of this Agreement, 240 | but in order to avoid inconsistency the Agreement is copyrighted and 241 | may only be modified in the following manner. The Agreement Steward 242 | reserves the right to publish new versions (including revisions) of 243 | this Agreement from time to time. No one other than the Agreement 244 | Steward has the right to modify this Agreement. The Eclipse Foundation 245 | is the initial Agreement Steward. The Eclipse Foundation may assign the 246 | responsibility to serve as the Agreement Steward to a suitable separate 247 | entity. Each new version of the Agreement will be given a distinguishing 248 | version number. The Program (including Contributions) may always be 249 | Distributed subject to the version of the Agreement under which it was 250 | received. In addition, after a new version of the Agreement is published, 251 | Contributor may elect to Distribute the Program (including its 252 | Contributions) under the new version. 253 | 254 | Except as expressly stated in Sections 2(a) and 2(b) above, Recipient 255 | receives no rights or licenses to the intellectual property of any 256 | Contributor under this Agreement, whether expressly, by implication, 257 | estoppel or otherwise. All rights in the Program not expressly granted 258 | under this Agreement are reserved. Nothing in this Agreement is intended 259 | to be enforceable by any entity that is not a Contributor or Recipient. 260 | No third-party beneficiary rights are created under this Agreement. 261 | 262 | Exhibit A - Form of Secondary Licenses Notice 263 | 264 | "This Source Code may also be made available under the following 265 | Secondary Licenses when the conditions for such availability set forth 266 | in the Eclipse Public License, v. 2.0 are satisfied: {name license(s), 267 | version(s), and exceptions or additional permissions here}." 268 | 269 | Simply including a copy of this Agreement, including this Exhibit A 270 | is not sufficient to license the Source Code under Secondary Licenses. 271 | 272 | If it is not possible or desirable to put the notice in a particular 273 | file, then You may include the notice in a location (such as a LICENSE 274 | file in a relevant directory) where a recipient would be likely to 275 | look for such a notice. 276 | 277 | You may add additional accurate notices of copyright ownership. 278 | -------------------------------------------------------------------------------- /clojureranker.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | --------------------------------------------------------------------------------