David.
Thanks.
Im placing this code:
NSLog.out.appendln("Setting the index");
ERAutoIndex autoIndex =
(ERAutoIndex)ERIndex.indexNamed("TransFromBaseIndexs");
NSArray<ERAutoIndex> indices = new NSArray<ERAutoIndex>(new
ERAutoIndex[] { autoIndex } );
ERIndexer indexer = new ERIndexer( indices );
EOModel eomodel =
EOModelGroup.defaultGroup().modelNamed("XWSLocalizerEOM");
EOEntity eoentity = eomodel.entityNamed("TransFromBase");
indexer.indexAllObjects(eoentity);
in the Application constructor, I dunno if its the right place to do so,
also im passing just the enitty I want to index, but i think based on the
indexModel I create it should index jsut that one even I pass the whole
eomodel, right?
Thanks for the help.
Gustavo
On Sat, Oct 17, 2009 at 9:43 PM, David LeBer <[email protected]>wrote:
>
> On 2009-10-17, at 3:15 PM, Gustavo Pizano wrote:
>
> Asa.. THANKS TONS!!!!!! :D:D:D.
>>
>> So I don't need to add anything else to the index ?, thats cool, I just
>> need to initialize it once then.. let's say before deploying so the index
>> file will be created with the current data, and once the users start
>> updating the table it will get update it?.
>>
>
> Yes.
>
>
>
>> G.
>>
>>
>> On Oct 17, 2009, at 8:27 PM, David LeBer wrote:
>>
>>
>>> On 2009-10-17, at 1:41 PM, Asa Hardcastle wrote:
>>>
>>> As your EOs are modified, they are reindexed, I believe. Attached is a
>>>> sample.
>>>>
>>>
>>> Yeah. ERIndexing ties into the EC notifications and does a pretty good
>>> job of doing a targeted re-indexing any updated entities. However, you do
>>> need to manually trigger a full index if you change the model, decide you
>>> want to index different things, or import content outside of your
>>> application.
>>>
>>>
>>>> :)
>>>>
>>>> Asa
>>>>
>>>>
>>>> <ProductInFileStore.indexModel>
>>>>
>>>>
>>>>
>>>>
>>>> On Oct 17, 2009, at 4:17 AM, Gustavo Pizano wrote:
>>>>
>>>> Asa,
>>>>>
>>>>> Yes yesterday I was looking that api trying to understand where to put
>>>>> that code, now that you mention it then it must be a file in the Resource
>>>>> folder... hehe.. So if I got it right, I have to create a file
>>>>> Document.indexModel and setup there all what the api doc shows, then I
>>>>> loaded with :
>>>>>
>>>>> ERAutoIndex index = (ERAutoIndex)ERIndex.indexNamed("Document");
>>>>> ...
>>>>> ...
>>>>>
>>>>> An example will be GREAT :D:D, you will make my weekend.. :D:D:D.
>>>>> A few questions:
>>>>> - Im expecting my users to modify the table TransFromBase(the one I
>>>>> want to index), so I will need once they modify it, add the EO to the
>>>>> index? isn't it.?
>>>>> - Also im expecting this modifications on the table to done by more
>>>>> than one user at the same time, fortunately I made sure that they are not
>>>>> modifying the same records, :P, in fact as I design it its not possible to
>>>>> do it, So what should I have into consideration then?
>>>>>
>>>>> Thanks a LOT
>>>>>
>>>>> Gustavo
>>>>>
>>>>>
>>>>>
>>>>> On Oct 16, 2009, at 11:18 PM, Asa Hardcastle wrote:
>>>>>
>>>>> Hi Gustavo,
>>>>>>
>>>>>> I run this in my application startup. Do you have an indexModel file
>>>>>> in your Resource folder? This file is used by ERAutoIndex to specify the
>>>>>> entities and attributes to index.
>>>>>>
>>>>>>
>>>>>> http://webobjects.mdimension.com/hudson/job/Wonder53/javadoc/er/indexing/ERAutoIndex.html
>>>>>>
>>>>>> I have an example that I use for a Product entity if you need an
>>>>>> example.
>>>>>>
>>>>>> Asa
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Oct 16, 2009, at 4:58 PM, Gustavo Pizano wrote:
>>>>>>
>>>>>> Asa hello.
>>>>>>>
>>>>>>> Thanks for the code,
>>>>>>>
>>>>>>> few questions the index then its created each time the instance of
>>>>>>> the component its initialized isn't it? or can I put this in the
>>>>>>> Application.java, so it will be initialized at the beginning...
>>>>>>> Also instead of passing all the EOModel I can pass the EOEntity, this
>>>>>>> will index me all the records in the table of that EOEntity isn't it?
>>>>>>>
>>>>>>> Well I will see how it goes, and then the funny part. ... the
>>>>>>> searcher.. :P
>>>>>>>
>>>>>>> Thanks a lot for the code.
>>>>>>>
>>>>>>>
>>>>>>> G.
>>>>>>>
>>>>>>>
>>>>>>> On Oct 16, 2009, at 7:01 PM, Asa Hardcastle wrote:
>>>>>>>
>>>>>>> Hi Gustavo,
>>>>>>>>
>>>>>>>> This is the code I use to do an initial index on a large product
>>>>>>>> database:
>>>>>>>>
>>>>>>>> // MyIndexModel.indexModel is located in Resources folder
>>>>>>>> ERAutoIndex autoIndex =
>>>>>>>> (ERAutoIndex)ERIndex.indexNamed("MyIndexModel");
>>>>>>>> NSArray<ERAutoIndex> indices = new NSArray<ERAutoIndex>(new
>>>>>>>> ERAutoIndex[] { autoIndex } );
>>>>>>>> ERIndexer indexer = new ERIndexer( indices );
>>>>>>>> EOModel eomodel = EOModelGroup.defaultGroup().modelNamed("MyModel");
>>>>>>>> indexer.indexAllObjects(eomodel);
>>>>>>>>
>>>>>>>> The only caveat is that I modified the ERIndexing framework
>>>>>>>> slightly, and I do not have the code in front of me or checked in to
>>>>>>>> SVN,
>>>>>>>> arg... it was one of those special cases, and it is on a hard drive
>>>>>>>> that I
>>>>>>>> had in my previous development machine.
>>>>>>>>
>>>>>>>> Hope this helps,
>>>>>>>>
>>>>>>>> Asa
>>>>>>>>
>>>>>>>>
>>>>>>>> On Oct 16, 2009, at 2:49 AM, Gustavo Pizano wrote:
>>>>>>>>
>>>>>>>> Ok Im reading the LIA, so if I understand good I must first create
>>>>>>>>> an Index, this is the ERXIndex, isn't it?, in the examples of the
>>>>>>>>> book they
>>>>>>>>> create a IndexWriter, dunno what is this in the er.indexing. Then
>>>>>>>>> they
>>>>>>>>> create a document and add to the document the file they are indexing,
>>>>>>>>> theyn
>>>>>>>>> thye add the keywrord for the filepath, then they add the docuemtn to
>>>>>>>>> the
>>>>>>>>> writer.
>>>>>>>>>
>>>>>>>>> Let's put that in the WOrld
>>>>>>>>> So the entity I want to index its called TransFromBase, but from
>>>>>>>>> that I just want to index the attribute trans.
>>>>>>>>> So following the example,
>>>>>>>>> 1. Create the index.
>>>>>>>>> I see ERIndex, and ERAutoIndex, I don't understand the
>>>>>>>>> documentation well on what ERXAutoIndex configuration, is the comment
>>>>>>>>> in api
>>>>>>>>> doc, the indexDef NSDictionary must pass in the Constructor?.
>>>>>>>>> Anyway
>>>>>>>>> I have the follwoing :
>>>>>>>>> ERIndex index = ERIndex.indexNamed("fuzzyIndex");
>>>>>>>>> -Now I need to create the documents for each EO, this is like
>>>>>>>>> 50.000 !!!. becuase createDocumentForObjetcs its oprotected, I guess
>>>>>>>>> I must
>>>>>>>>> use then
>>>>>>>>> index.addObjectsToIndex(session().defaultEditingContext(),tbArray);
>>>>>>>>> //previusly fetched.
>>>>>>>>>
>>>>>>>>> And now I dunno what else to do. :( I need to specify that I want
>>>>>>>>> to index the tran attribute only, becyase on that its what Im gonna
>>>>>>>>> search,
>>>>>>>>> ..
>>>>>>>>>
>>>>>>>>> Any more ideas that can help me please?
>>>>>>>>>
>>>>>>>>> Thanks
>>>>>>>>>
>>>>>>>>> Gustavo
>>>>>>>>>
>>>>>>>>> PS: Oh yes and then I need to create the searcher.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Fri, Oct 16, 2009 at 7:37 AM, Gustavo Pizano <
>>>>>>>>> [email protected]> wrote:
>>>>>>>>> I wish I had been there, this is driving me crazy already.
>>>>>>>>>
>>>>>>>>> I wanna make it work... :(
>>>>>>>>>
>>>>>>>>> G.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Thu, Oct 15, 2009 at 6:14 PM, David Avendasora <
>>>>>>>>> [email protected]> wrote:
>>>>>>>>> WOWODC Presentation!!
>>>>>>>>>
>>>>>>>>> Dave
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Oct 15, 2009, at 10:53 AM, David LeBer wrote:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On 2009-10-15, at 10:49 AM, Kieran Kelleher wrote:
>>>>>>>>>
>>>>>>>>> Simon,
>>>>>>>>>
>>>>>>>>> I recommend the "Lucene in Action" book .... easy to read and
>>>>>>>>> digest ....... excellent reference book. IIRC the book author is the
>>>>>>>>> original author of Lucene. Buying it on amazon is a no-brainer if you
>>>>>>>>> are
>>>>>>>>> trying to use ERIndexing IMHO.
>>>>>>>>>
>>>>>>>>> Regards, Kieran
>>>>>>>>>
>>>>>>>>> I agree.
>>>>>>>>>
>>>>>>>>> I didn't really find any documentation when I used ERIndexing, but
>>>>>>>>> the LIA book along with the source made it pretty easy.
>>>>>>>>>
>>>>>>>>> I really should go back and document what I did :-)
>>>>>>>>>
>>>>>>>>> On Oct 15, 2009, at 10:19 AM, Simon McLean wrote:
>>>>>>>>>
>>>>>>>>> do you know if there are there any docs on erindexing ? or maybe an
>>>>>>>>> old wowodc presentation or something to get me started ? i've checked
>>>>>>>>> the
>>>>>>>>> usual places (package.html, wiki, google)
>>>>>>>>>
>>>>>>>>> if not i'll start poking around the code.
>>>>>>>>>
>>>>>>>>> thanks, simon
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Depending on how 'fuzzy' you really need your matches to be, you
>>>>>>>>> might want to check out Lucene. We've had great success using it to
>>>>>>>>> return
>>>>>>>>> type ahead suggestions. Results from the Lucene index are wickedly
>>>>>>>>> fast.
>>>>>>>>>
>>>>>>>>> ERIndexing in Wonder wraps Lucene.
>>>>>>>>>
>>>>>>>>> ;david
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> David LeBer
>>>>>>>>> Codeferous Software
>>>>>>>>> 'co-def-er-ous' adj. Literally 'code-bearing'
>>>>>>>>> site: http://codeferous.com
>>>>>>>>> blog: http://davidleber.net
>>>>>>>>> profile: http://www.linkedin.com/in/davidleber
>>>>>>>>> twitter: http://twitter.com/rebeld
>>>>>>>>> --
>>>>>>>>> Toronto Area Cocoa / WebObjects developers group:
>>>>>>>>> http://tacow.org
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> _______________________________________________
>>>>>>>>> Do not post admin requests to the list. They will be ignored.
>>>>>>>>> Webobjects-dev mailing list ([email protected])
>>>>>>>>> Help/Unsubscribe/Update your Subscription:
>>>>>>>>>
>>>>>>>>> http://lists.apple.com/mailman/options/webobjects-dev/simon%40potwells.co.uk
>>>>>>>>>
>>>>>>>>> This email sent to [email protected]
>>>>>>>>>
>>>>>>>>> _______________________________________________
>>>>>>>>> Do not post admin requests to the list. They will be ignored.
>>>>>>>>> Webobjects-dev mailing list ([email protected])
>>>>>>>>> Help/Unsubscribe/Update your Subscription:
>>>>>>>>>
>>>>>>>>> http://lists.apple.com/mailman/options/webobjects-dev/kieran_lists%40mac.com
>>>>>>>>>
>>>>>>>>> This email sent to [email protected]
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> ;david
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> David LeBer
>>>>>>>>> Codeferous Software
>>>>>>>>> 'co-def-er-ous' adj. Literally 'code-bearing'
>>>>>>>>> site: http://codeferous.com
>>>>>>>>> blog: http://davidleber.net
>>>>>>>>> profile: http://www.linkedin.com/in/davidleber
>>>>>>>>> twitter: http://twitter.com/rebeld
>>>>>>>>> --
>>>>>>>>> Toronto Area Cocoa / WebObjects developers group:
>>>>>>>>> http://tacow.org
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> _______________________________________________
>>>>>>>>> Do not post admin requests to the list. They will be ignored.
>>>>>>>>> Webobjects-dev mailing list ([email protected])
>>>>>>>>> Help/Unsubscribe/Update your Subscription:
>>>>>>>>>
>>>>>>>>> http://lists.apple.com/mailman/options/webobjects-dev/webobjects%40avendasora.com
>>>>>>>>>
>>>>>>>>> This email sent to [email protected]
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> _______________________________________________
>>>>>>>>> Do not post admin requests to the list. They will be ignored.
>>>>>>>>> Webobjects-dev mailing list ([email protected])
>>>>>>>>> Help/Unsubscribe/Update your Subscription:
>>>>>>>>>
>>>>>>>>> http://lists.apple.com/mailman/options/webobjects-dev/webobjectspicora%40gmail.com
>>>>>>>>>
>>>>>>>>> This email sent to [email protected]
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> _______________________________________________
>>>>>>>>> Do not post admin requests to the list. They will be ignored.
>>>>>>>>> Webobjects-dev mailing list ([email protected])
>>>>>>>>> Help/Unsubscribe/Update your Subscription:
>>>>>>>>>
>>>>>>>>> http://lists.apple.com/mailman/options/webobjects-dev/a.talk%40zenn.net
>>>>>>>>>
>>>>>>>>> This email sent to [email protected]
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>> _______________________________________________
>>>> Do not post admin requests to the list. They will be ignored.
>>>> Webobjects-dev mailing list ([email protected])
>>>> Help/Unsubscribe/Update your Subscription:
>>>>
>>>> http://lists.apple.com/mailman/options/webobjects-dev/dleber_wodev%40codeferous.com
>>>>
>>>> This email sent to [email protected]
>>>>
>>>
>>> ;david
>>>
>>> --
>>> David LeBer
>>> Codeferous Software
>>> 'co-def-er-ous' adj. Literally 'code-bearing'
>>> site: http://codeferous.com
>>> blog: http://davidleber.net
>>> profile: http://www.linkedin.com/in/davidleber
>>> twitter: http://twitter.com/rebeld
>>> --
>>> Toronto Area Cocoa / WebObjects developers group:
>>> http://tacow.org
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Do not post admin requests to the list. They will be ignored.
>>> Webobjects-dev mailing list ([email protected])
>>> Help/Unsubscribe/Update your Subscription:
>>>
>>> http://lists.apple.com/mailman/options/webobjects-dev/webobjectspicora%40gmail.com
>>>
>>> This email sent to [email protected]
>>>
>>
>>
> ;david
>
> --
> David LeBer
> Codeferous Software
> 'co-def-er-ous' adj. Literally 'code-bearing'
> site: http://codeferous.com
> blog: http://davidleber.net
> profile: http://www.linkedin.com/in/davidleber
> twitter: http://twitter.com/rebeld
> --
> Toronto Area Cocoa / WebObjects developers group:
> http://tacow.org
>
>
>
>
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [email protected]