qfdk / GenTrainingDataSolr

GenTrainingDataSolr for apache solr LTR (learning to rank)

Home Page:http://ltr.qfdk.me

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GenTrainingDataSolr

Quick start

cd web
npm install
npm run dev

Using traing Data in your query.txt, run traing_data.py then enjoy :) For more detail Apache Solr LTR

Production

cd web
npm install
npm run build
cd dist
cp -r * /home/wwwroot/your.domaine

Apache

<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /
  RewriteRule ^index\.html$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /index.html [L]
</IfModule>

nginx

location / {
  try_files $uri $uri/ /index.html;
}

Enable CORS in Apache Solr

Add this code in server/solr-webapp/webapp/WEB-INF/web.xml

<filter>
    <filter-name>cross-origin</filter-name>
    <filter-class>org.eclipse.jetty.servlets.CrossOriginFilter</filter-class>
    <init-param>
         <param-name>allowedOrigins</param-name>
         <param-value>*</param-value>
    </init-param>
     <init-param>
         <param-name>allowedMethods</param-name>
         <param-value>GET,POST,DELETE,PUT,HEAD,OPTIONS</param-value>
     </init-param>
     <init-param>
         <param-name>allowedHeaders</param-name>
         <param-value>origin, content-type, cache-control, accept, options, authorization, x-requested-with</param-value>
     </init-param>
    <init-param>
        <param-name>supportsCredentials</param-name>
        <param-value>true</param-value>
    </init-param>
    <init-param>
      <param-name>chainPreflight</param-name>
      <param-value>false</param-value>
    </init-param>
</filter>

<filter-mapping>
  <filter-name>cross-origin</filter-name>
  <url-pattern>/*</url-pattern>
</filter-mapping>

References

Apache Solr LTR

About

GenTrainingDataSolr for apache solr LTR (learning to rank)

http://ltr.qfdk.me


Languages

Language:Vue 57.1%Language:JavaScript 41.1%Language:HTML 1.8%