<div dir="ltr">Hi,<br><div class="gmail_quote"><div dir="ltr"><div><br>I'm currently 
reviewing my originally proposed API design and I added two new 
fields(idField, stemmer) to the xapian_index() function. As my 
next task I'm planning to determine the output data structure and format
 of xapian_search() function. Afterwards I will focus back on 
xapian_index() function and review the format of valueSlots parameter. <br><br></div><div>An outline of 'simple indexing' functionality:<br></div><div>


        
        
        
        


<p style="margin-bottom:0in;line-height:100%">xapian_index(dbpath=””,
datapath=””, idField=c(0), indexFields=NULL,
stemmer=””,valueSlots=NULL, …)</p>

<p style="margin-bottom:0in;line-height:100%">dbpath: Path to a
xapian database</p>datapath: Path to
a data source<br>idField: Column number of a column in the data frame whose row value will be used as a unique
identifier<br>indexFields: A list
of character vectors each containing a field name and a prefix<br>stemmer: language
stemmer
<p style="margin-bottom:0in;line-height:100%"> 
</p>
<p style="margin-bottom:0in;line-height:100%">xapian_index() function can be used to index the content of a data frame.</p><p style="margin-bottom:0in;line-height:100%">Convert the data
frame(df) to a csv. (Skip this step if data source is already a csv file): 
</p>

<p style="margin-bottom:0in;line-height:100%">>>  write.csv(df, ”location/of/data.csv”)</p>

<p style="margin-bottom:0in;line-height:100%">>>  f1 <-
c(“Title”,”S”)</p>

<p style="margin-bottom:0in;line-height:100%">>>  f2<-
c(“Description”,”XD”)</p>

<p style="margin-bottom:0in;line-height:100%">>>  fields<-
list(f1,f2)</p>
<p style="margin-bottom:0in;line-height:100%">>>  idField
<-c(0)
</p><p style="margin-bottom:0in;line-height:100%">>>  xapian_index(“path/to/database”,”location/of/data.csv”,
idField=c(0), indexFields=fields,stemmer=”en”)
</p><p style="margin-bottom:0in;line-height:100%"><br>
</p>For indexing
multiple data frames of similar format:

<p style="margin-bottom:0in;line-height:100%">>>  dataLoc
<-c(“path1”,”path2”,”path3”, …)</p>

<p style="margin-bottom:0in;line-height:100%">>>  for(dataSource in
dataLoc){</p>           xapian_index(“path/to/database”,dataSource,
idField=c(0),    indexFields=fields,stemmer=”en”)<br>      }<br><br><p style="margin-bottom:0in;line-height:100%">Best regards,</p><p style="margin-bottom:0in;line-height:100%">Amanda<br>
</p>

<br></div><div><br></div></div>
</div><br></div>