Re: [lucy-user] C library, merging 2 indexes into 1

2017-07-11 Thread Serkan Mulayim
:) thanks Nick, how did I miss it? Sorry for the disturbance. On Tue, Jul 11, 2017 at 11:58 AM, Nick Wellnhofer wrote: > On Jul 11, 2017, at 19:02 , Serkan Mulayim > wrote: > > I have a question if possible. Assume that I have 2 indexes, index1 and > index2. I would like to me

[lucy-user] C library, merging 2 indexes into 1

2017-07-11 Thread Serkan Mulayim
Hi guys, I have a question if possible. Assume that I have 2 indexes, index1 and index2. I would like to merge index2 into index1 (and then delete index2 but I can do it separately). Is there a method which does this task? e.g. Lucy_Indexer_merge_index(Indexer *destination, Indexer *source); O

[lucy-user] C Library: Regex query

2017-06-08 Thread Serkan Mulayim
Hi guys, I would like to ask if it is possible to do regex queries (without adding new fields, and tokenizing differently) in the C library. What I need to do is to be able to be able to return documents based on file name suffix. So that a query as (*.pdf) should return all documents that cont

Re: [lucy-user] C library:Suggester

2017-05-16 Thread Serkan Mulayim
Thank you very much Nick, I tried your suggestion and it worked. And this is a much simpler way of getting the LexiconReader. I suppose it does the lexicon run over all segments in the index, right? On Tue, May 16, 2017 at 7:56 AM, Nick Wellnhofer wrote: > On 15/05/2017 23:13, Serkan Mula

Re: [lucy-user] C library:Suggester

2017-05-15 Thread Serkan Mulayim
ut); } On Wed, May 3, 2017 at 2:30 PM, Peter Karman wrote: > You might find this Perl implementation a helpful reference. > > https://metacpan.org/pod/LucyX::Suggester > > On Wed, May 3, 2017 at 3:06 PM, Serkan Mulayim > wrote: > > > Thank you very much Marvin, >

Re: [lucy-user] C library:Suggester

2017-05-03 Thread Serkan Mulayim
pe the returned results in the lucy_Lex_seek contains the frequency of the terms as well. Thanks again, Serkan On Tue, May 2, 2017 at 4:22 PM, Marvin Humphrey wrote: > On Mon, May 1, 2017 at 3:55 PM, Serkan Mulayim > wrote: > > > I am using the C library. I woul

[lucy-user] C library:Suggester

2017-05-01 Thread Serkan Mulayim
Hi guys, I am using the C library. I would like to get the suggester or autocomplete functionality in my library. It needs to return {"hello", "hell", "hellx"} when your query is "hell". I feel like I need to be able to read all the tokens in the whole index, and return the results based on it.

Re: [lucy-user] C library, how to check index is healthy

2017-02-28 Thread Serkan Mulayim
rged and optimized? Thanks in advance. Serkan On Tue, Feb 14, 2017 at 7:03 AM, Nick Wellnhofer wrote: > On 13/02/2017 20:44, Serkan Mulayim wrote: > >> 1- How do we check that the index is healthy for SEARCHING (e.g. creating >> a searcher) without a crash? As I see there is no probl

[lucy-user] C library, how to check index is healthy

2017-02-13 Thread Serkan Mulayim
Hi guys, I have a few questions for maintaining the health of the index in the C library. 1- How do we check that the index is healthy for SEARCHING (e.g. creating a searcher) without a crash? As I see there is no problem in creating a Searcher even if there is a lock (write.lock or merge.lock)

[lucy-user] About error handling in Lucy C library

2017-02-01 Thread Serkan Mulayim
Hi guys, According to the documentation, I see there is an exception/error handling mechanism built in the C library. For example in https://lucy.apache.org/docs/c/Lucy/Index/Indexer.html, "If a write lock cannot be secured, new() will throw an exception". Or in the Indexer.c the code line "TH

Re: [lucy-user] C library - DECREFing PolySearcher

2017-01-06 Thread Serkan Mulayim
Thank you Nick, I think there might be a problem in my code which is not related to this. I am working on verifying it. I am sorry if I caused if any troubles. Thanks again... On Fri, Jan 6, 2017 at 10:08 AM, Nick Wellnhofer wrote: > On 06/01/2017 18:55, Serkan Mulayim wrote: > >&

Re: [lucy-user] C library - DECREFing PolySearcher

2017-01-06 Thread Serkan Mulayim
Thanks Nick, Then can there be a bug s.t. you try to decref the searcher after getting 0 results? Thanks again, Serkan On Fri, Jan 6, 2017 at 4:20 AM, Nick Wellnhofer wrote: > On 06/01/2017 01:31, Serkan Mulayim wrote: > >> I believe it is not directly related to the numbe

[lucy-user] Re: C library - DECREFing PolySearcher

2017-01-05 Thread Serkan Mulayim
Sorry guys, 1 more update: when I build the app with -O2 and without -g, the issue is gone. This makes me think that there is something wrong with the timing, and related to threads. Just speculating :) On Thu, Jan 5, 2017 at 5:08 PM, Serkan Mulayim wrote: > Update: I can reproduce it w

[lucy-user] Re: C library - DECREFing PolySearcher

2017-01-05 Thread Serkan Mulayim
Update: I can reproduce it with IndexSearcher too. Previously I had said that it was only happening in PolySearcher... On Thu, Jan 5, 2017 at 4:31 PM, Serkan Mulayim wrote: > Hi guys, > > I have a question regarding the searchers (PolySearcher and IndexSearcher). > > I wrote an

[lucy-user] C library - DECREFing PolySearcher

2017-01-05 Thread Serkan Mulayim
Hi guys, I have a question regarding the searchers (PolySearcher and IndexSearcher). I wrote an application to do searching and indexing for 2 cases: 1- unified index(searched via IndexSearcher) 2- splitted index (there are around 12 indexes to be searched via PolySearcher). Both indexes have the

Re: [lucy-user] Building lucy for c

2016-12-21 Thread Serkan Mulayim
Hi Nick, I assumed all the structure would be resolved during Lucy's Makefile generation. Apparently you solved this with install scripts. Thanks for your response (as always) Serkan On Wed, Dec 21, 2016 at 5:24 AM, Nick Wellnhofer wrote: > On 20/12/2016 23:40, Serkan Mulayim wrote:

[lucy-user] Building lucy for c

2016-12-20 Thread Serkan Mulayim
Hi guys, I have a question on building lucy library. The way that I build it is, 1- I first build clownfish compiler and runtime. 2- create a folder /clownfish 3- create 3 folders in /clownfish bin (contains cfc) lib (contains clownfish dynamic library) share (contains clownfish/runtime/c/autogen

[lucy-user] Getting search results as json objects

2016-11-30 Thread Serkan Mulayim
Hi guys, I am using the Lucy C library. I would like to ask if it is possible to get the HitDocs as Json Strings. I see that there is a dump method "LUCY_Doc_Dump" in Doc.c and HitDoc, can this be used for this. Can you elaborate on what "dump" does? There is also S_to_json in json.c which expe

Re: [lucy-user] Re: Regarding document Ids

2016-11-21 Thread Serkan Mulayim
Thank you Peter for your comments. Regards... On Wed, Nov 16, 2016 at 3:05 PM, Peter Karman wrote: > Serkan Mulayim wrote on 11/16/16, 2:21 PM: > >> Thank you Peter for your quick response. >> >> As I understand before adding new documents to the index, you delete by

Re: [lucy-user] Re: Regarding document Ids

2016-11-16 Thread Serkan Mulayim
performance would be affected. Roughly, how many documents do you have in your index, and what is the document size? BTW, my document sizes are very small, and I think I will have around 40K documents. Thanks, Serkan On Wed, Nov 16, 2016 at 11:25 AM, Peter Karman wrote: > Serkan Mulayim wrote on

[lucy-user] Re: Regarding document Ids

2016-11-16 Thread Serkan Mulayim
truly need a primary key field, you must define it and populate it yourself". How can we do this, are there any examples around this? Should I search for the document with the primary key before indexing and if it exists, should I not index it? Thanks, Serkan On Tue, Nov 15, 2016 at 2:22

[lucy-user] Regarding document Ids

2016-11-15 Thread Serkan Mulayim
Hi, As far as I see if we add the same document twice, it creates a new document. As per http://lucy.apache.org/docs/c/Lucy/Docs/DocIDs.html, " If you truly need a primary key field, you must define it and populate it yourself". Can you please elaborate on this one? Does it mean choosing a field t

Re: [lucy-user] Does multivalued field support exist in Lucy?

2016-11-11 Thread Serkan Mulayim
Thank you Nick, I will give it a try. It sounds really promising. On Fri, Nov 11, 2016 at 11:03 AM, Nick Wellnhofer wrote: > On 11/11/2016 19:46, Serkan Mulayim wrote: > >> I was referring to C library not Perl, sorry for not putting it on my >> question. >> >> P

Re: [lucy-user] Does multivalued field support exist in Lucy?

2016-11-11 Thread Serkan Mulayim
RegexTokenizer passed the test. Thanks again guys, Serkan On Fri, Nov 11, 2016 at 4:28 AM, Nick Wellnhofer wrote: > On 10/11/2016 23:38, Serkan Mulayim wrote: > >> 2- I would like to have a static library which would not depend on PCRE. >> (I >> know this is a second

[lucy-user] Does multivalued field support exist in Lucy?

2016-11-10 Thread Serkan Mulayim
Hi guys, I would like to understand if multivalued fields can be defined in the Lucy? To be more specific can I put multiple StringType objects to a single field? I could not find any solution for this. And I do not want to use RegexTokenizer for a few reasons: 1- I do not want to have any comple