> > >Is there a reason you're using a stored CSV rather than doing it from > >a data frame directly? That would avoid having to read from a foreign > >format, write to CSV and then read again in order to index it.No. The input data structure to xapian_index() will indeed be a data frame. Even a stored CSV can be conveniently converted to a data frame. There are few further modifications to xapian_index() function that are not indicated in the example and I will provide a complete draft of the function after reviewing those further.>Also, do R users expect to use numeric indexing into their data, or > >name indexing? Or would it be better to support both?Is there a specific way of implementing numeric indexing with Xapian? In R numeric indexing can be used to extract content of a data frame (and other R data structures). Since xapian_search() will return a data frame, its elements can be conveniently extracted using various functions in R. Best regards, Amanda -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.xapian.org/pipermail/xapian-devel/attachments/20160503/80533fa9/attachment.html>
On Tue, May 03, 2016 at 01:18:42AM +0530, Amanda Jayanetti wrote:> > Also, do R users expect to use numeric indexing into their data, or > > name indexing? Or would it be better to support both? > > Is there a specific way of implementing numeric indexing with Xapian? In R > numeric indexing can be used to extract content of a data frame (and other > R data structures). Since xapian_search() will return a data frame, its > elements can be conveniently extracted using various functions in R.Sorry, I meant specifically in the arguments to xapian_index where you're specifying a column in the data frame. My understanding is that R supports both name indexing and numeric indexing, but it looked like you were suggesting that (for instance) the ID column in the data frame would only be specified by numeric index. J -- James Aylett, occasional trouble-maker xapian.org
> > >but it looked like > >you were suggesting that (for instance) the ID column in the data > >frame would only be specified by numeric index. >The parameter idField is only used to allow the user to specify a column whose row values will be used as unique identifiers. If it's required to index the idField then it should be separately included in the indexFields list as shown below. indexFields <-list( list(0,"S","id_NUMBER"), list(2,"S","Title"), list(8,"XD","Description")) Note: the structure of arguments to indexFields parameter was slightly changed and follows the format shown above. Best regards, Amanda -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.xapian.org/pipermail/xapian-devel/attachments/20160503/0ea54d3b/attachment.html>