Skip to content

Solr query function that retrieve price according to unix timestamp.

License

Notifications You must be signed in to change notification settings

gilek/solr-timestampprice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Solr timestampprice function query

Solr query function that retrieve price (float value) according to current / entered unix timestamp.

Data format

Function expects data in the following format:

date_from|price[ date_from|price ...]

In example:

1483228800|100.00 1483239600|63.30 1483272000|100.00

Installation

  1. Compile project:

    mvn clean install
  2. Copy generated jar file to Solr contrib folder:

    cp target/solr-timestampprice-*.jar <SOLR_INSTALL_DIR>/contrib
    
  3. Add definition in solrconfig.xml file:

    <lib dir="${solr.install.dir:../../../..}/contrib" regex="solr\-timestampprice\-.+\.jar" />
    <valueSourceParser name="timestamp_price" class="net.gilek.solr.timestampprice.TimestampPriceValueSourceParser" />

Usage

timestamp_price(source[, timestamp])

Function accepts the following parameters:

Parameter Required Description
source yes Source value. It can be name of the field or string type value (in quotation marks).
timestamp no Unix timestamp. If empty (default) actual time will be used.

About

Solr query function that retrieve price according to unix timestamp.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages