Skip to content
This repository has been archived by the owner on Jan 11, 2019. It is now read-only.
/ heliotrope Public archive

SOLR client for Rust programming language

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

Valve/heliotrope

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

87 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Heliotrope

SOLR client for Rust programming language


[dependencies]
heliotrope = "*"

TODO

  • facets
  • deleting docs
  • highlighting
  • etc

Try it!

git clone https://github.com/Valve/heliotrope
cd heliotrope
cargo run --example hello

Usage

Add dependency to your project by Cargo.toml

[dependencies]
heliotrope = "*"
extern crate heliotrope;
extern crate url;

use heliotrope::{Solr, SolrDocument, SolrQuery};
use url::Url;


fn main(){
    let base_url = "http://localhost:8983/solr/test/";
    let url: Url = Url::parse(base_url).unwrap();
    let client = SolrClient::new(&url);

    let doc = SolrDocument::new();
    doc.add_field("id", "1");
    doc.add_field("city", "London");

    client.add_and_commit(&doc);

    let query_all = SolrQuery::new("*:*");
    let results = client.query(&query_all);
    if let Ok(resp) = results {
        println!("Retreived results {:?}", resp);
    }
}

Licence

Copyright 2015 Valentin Vasilyev, Dzmitry Misiuk

Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. This file may not be copied, modified, or distributed except according to those terms.

About

SOLR client for Rust programming language

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages