R bindings for Xapian search engine library.
C++ R Other
Latest commit f075f9e Aug 18, 2016 @amandaJayanetti committed on GitHub Merge pull request #29 from amandaJayanetti/feature
Add xapian_delete function
Permalink
Failed to load latest commit information.
R
demo
inst/sampleData
man
src
tests
.Rbuildignore
.gitignore
.travis.yml
DESCRIPTION
NAMESPACE
README.md
cleanup
configure
configure.ac

README.md

R bindings for Xapian search engine library.

Installing RXapian
install.packages("devtools")
library(devtools)
install_github("amandaJayanetti/RXapian")
Indexing a data frame with RXapian
# Example I
# preparing arguments for xapian_index
  ID_NUMBER <-c("1974-100",
                "1938-371",
                "1985-438")

  ITEM_NAME <-c("Pocket horizontal sundial",
                "diptych sundial",
                "Spring driven pendulum clock")

  TITLE<-c("Ansonia Sunwatch",
           "Ivory diptych dial",
           "Copy  of a Dwerrihouse skeleton clock ")

  data<-data.frame(ID_NUMBER,ITEM_NAME,TITLE)
  db<- tempfile(pattern="RXapianEx-")
  id<-c(0)
  indexFields<-list(list(index=2,prefix="S"))

  xapian_index(dbpath = db,dataFrame = data,idColumn = id,indexFields = indexFields, stemmer = "en")
# Example II
  # preparing arguments for xapian_index
  ID_NUMBER <-c("1974-100",
                "1938-371",
                "1985-438")

  ITEM_NAME <-c("Pocket horizontal sundial",
                "diptych sundial",
                "Spring driven pendulum clock")

  TITLE<-c("Ansonia Sunwatch",
           "Ivory diptych dial",
           "Copy  of a Dwerrihouse skeleton clock ")

  MATERIALS <-c("brass (copper, zinc alloy); silvered; glass",
                "brass (copper, zinc alloy); steel (metal); cardboard; wood (unidentified)",
                "brass (copper, zinc alloy); steel (metal); wood (unidentified)")

  data<-data.frame(ID_NUMBER,ITEM_NAME,TITLE,MATERIALS)
  db<- tempfile(pattern="RXapianEx-")
  id<-c(0)
  indexFields<-list(list(index=2,prefix="S"))
  filterFields<-list(list(index=3,prefix="XM",separator=";"))

  xapian_index(db,data,id,indexFields,filterFields,"en")