IRC logs of #tryton for Friday, 2011-08-19 #tryton log beginning Fri Aug 19 00:00:02 CEST 2011
-!- ikks_(~ikks@ has joined #tryton01:11
-!- meanmicio(~lfm@ has joined #tryton02:50
-!- elbenfreund1( has joined #tryton03:36
-!- sebamarro(~sebastian@ has joined #tryton03:44
-!- alimon(alimon@ has joined #tryton04:53
-!- plantian( has joined #tryton04:59
-!- smarro_(~sebastian@ has joined #tryton06:48
-!- helmor(~helmo@ has joined #tryton07:00
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton07:36
-!- okko1( has joined #tryton07:37
-!- hoRn( has joined #tryton08:21
-!- pjstevns( has joined #tryton08:57
-!- pjstevns( has left #tryton08:57
-!- helmor(~helmo@ has joined #tryton09:17
-!- nicoe( has joined #tryton09:25
-!- pjstevns( has joined #tryton09:28
-!- jcm( has joined #tryton09:28
-!- vladimirek( has joined #tryton09:30
-!- helmor(~helmo@ has joined #tryton09:41
-!- okko1(~okko@ has joined #tryton09:45
-!- enlightx( has joined #tryton09:49
-!- bechamel( has joined #tryton09:56
-!- reichlich( has joined #tryton10:12
-!- ccomb( has joined #tryton10:34
-!- helmor(~helmo@ has joined #tryton11:10
-!- reichlich_( has joined #tryton11:13
-!- ccomb( has joined #tryton11:35
-!- ndn_pit(~ndn_pit@ has joined #tryton12:27
ndn_pitwhere should I pass URL like "tryton://<hostname>[:<port>]/<database>/model/<model name>[/<id>][;parameters]"?12:28
ndn_pithello :)12:28
cedkndn_pit: as argument of the tryton client12:29
ndn_pitcan you give me example?12:30
nicoe./bin/tryton tryton://localhost/demo/
ndn_pitthank you12:31
cedkndn_pit: ./bin/tryton tryton://
cedkndn_pit: it works on the demo server12:32
ndn_pitunderstood thanks12:33
ndn_pitif I should pass it from my external softphone, then why should I specify db?12:37
ndn_piti mean: db name may be chage sometimes12:39
nicoetryton supports more then one database, you should tell him which db to use12:39
cedkndn_pit: the database name is in the URL12:39
ndn_pit"ndn_pit: the database name is in the URL" it's exactly what i don't want )12:40
ndn_pitI think it's impossible, am i right?12:41
cedkndn_pit: it is impossible because it really depends on the database name12:41
ndn_pitok thanks12:42
cedkndn_pit: let say you want to open the Party form of the calling number, the id of the Party is linked to the database12:42
ndn_pitbut my db name can change in the future12:43
ndn_pitbut clients count may be 10012:43
ndn_piti mean operator count12:43
nicoewhy would your db name change ?12:44
ndn_pitI never know what will happen12:45
cedkndn_pit: I really don't see why you will change the name of the database12:46
cedkndn_pit: it is like the hostname of the server12:46
ndn_pitok may be I wrong, I just want to consider all situations12:48
-!- ndn_pit(~ndn_pit@ has left #tryton12:51
-!- vladimirek( has joined #tryton13:23
hoRncan anyone have a look if I'm trying to do impossible things or I am stupid - don't find a useful pysonstatement for this problem. finally is _parent_parent - or its broken by design
hoRnI am stupid13:38
-!- hoRn( has left #tryton13:47
-!- jcm( has joined #tryton14:04
-!- sharkcz(~sharkcz@2001:15c0:6747:160::7) has joined #tryton15:30
-!- smarro_(~sebastian@ has joined #tryton15:37
-!- sisalp( has joined #tryton15:38
-!- nicoe( has joined #tryton15:46
-!- ccomb( has joined #tryton15:48
-!- sisalp( has left #tryton15:53
-!- saxa(~sasa@ has joined #tryton15:57
-!- enlightx( has joined #tryton16:01
-!- zodman(~zodman@foresight/developer/zodman) has joined #tryton16:10
-!- bvillasanti(~bvillasan@ has joined #tryton16:20
-!- alimon(alimon@ has joined #tryton16:28
-!- gremly(~gremly@ has joined #tryton16:29
-!- bvillasanti(~bvillasan@ has left #tryton16:31
-!- pjstevns( has left #tryton17:10
-!- redarmy(~Miranda@ has joined #tryton17:35
redarmyis email integration ready? just see someone chat it in the irclog.17:36
-!- dfamorato(~dfamorato@2001:470:5:630:7815:60cb:36a6:d75b) has joined #tryton17:39
-!- sharoon( has joined #tryton17:39
dfamoratobechamel: ping17:39
bechameldfamorato: ping17:41
dfamoratobechamel: pong17:41
bechamel*pong :)17:41
dfamoratobechamel: Hi there ...17:41
nicoeredarmy: no email integration. I hope discuss it at the unconference and maybe have some poc later17:41
bechameldfamorato: Hi17:41
dfamoratobechamel: I see you had time to do some review on my code17:41
bechameldfamorato: yes17:42
dfamoratobechamel: A lot of code is spent on building the correct config... because this is crucial17:42
bechameldfamorato: yes I know17:42
dfamoratobechamel: but then, my intention is to have a cron which will add and remove records to the index17:43
dfamoratobechamel: any id's changed on the tryton side are stored to be added / removed from sphinx side17:43
bechameldfamorato: but it as several drawback, the main one being supporting all type of field17:44
bechameldfamorato: example, what append if I want to search invoices for customer "Doe"17:44
dfamoratobechamel: sorry, i don't understand what is the drawback17:44
dfamoratobechamel: No problem, we index all fields17:45
bechameldfamorato: what about many2one ?17:45
bechamelor even {many,one}2many17:45
dfamoratobechamel: many to one takes as attrtibues....17:46
dfamoratobechamel: My code takes in consideration the function fields and so on....17:47
dfamoratobechamel: Based on the context of the user17:47
bechameldfamorato: let me check17:47
dfamoratobechamel: so.. in order to index trasnlation, we would have to create a user for each installed language...17:48
dfamoratobechamel: and set the language per user17:48
dfamoratobechamel: Here is the thing..... I implemented addition functionality over my past code... So i din't start from scratch, I just added the XML Pipe functionality17:49
-!- okko1( has joined #tryton17:49
dfamoratobechamel: That's why you see SQL and XML there17:49
bechameldfamorato: where function fields are hanled ?17:50
dfamoratobechamel: let me open it and i will let you knwo17:50
dfamoratobechamel: above it gets the user context17:54
dfamoratobechamel: and here i get all fields available to this user
bechameldfamorato: yes but guess_type only handles date, integer, string, float and boolean17:55
bechameldfamorato: it miss function fields and  relation fields17:56
dfamoratobechamel: i think you are right....17:58
dfamoratobechamel: but here is what i think it can be done17:59
dfamoratobechamel: In my understanding, function fields will get a computed value bases on the context of the user and return a know variable type... like a float, numeric, integer and so on...18:00
bechameldfamorato: yes18:00
dfamoratobechamel: so, what if i check if isinstance(field, Function):  and then return guess_xml_type(field._field)18:00
dfamoratobechamel: I think that would work18:01
bechameldfamorato: yes and many2one must be also easy18:01
dfamoratobechamel: any ideas to help me on that ?18:02
bechameldfamorato: but for them you must index getattr(record, field).rec_name18:02
bechamelinstead of getattr(record, field)18:02
bechameland it's basically a string18:03
bechameldfamorato: *2many are also doable but I dont know if it's supported by sphinx18:03
dfamoratobechamel: You mean index .rec_name on the "Char, Text, Selection" fields right ?18:04
dfamoratobechamel: I think they are not  -->
bechameldfamorato: let's say I want to index invoice18:05
bechamelinvoice.amount is a float18:05
bechamelbut invoice.cutomer is an object18:06
bechamelso to index it we want to push invoice.customer.rec_name, which is exactly what is shown in the gtk client when an invoice is opened18:07
dfamoratobechamel: ok, i get it18:07
bechamelso for *2many, from a tryton perspective we could do a loop on the related record18:08
bechamelfor rec in invoice.lines: stream.write("..." % (..., rec.rec_name,))18:09
bechamelbut I don't know if sphinx can index a variable list of text for a same record18:11
bechameldfamorato: ^18:11
bechameland in my example (and after reading the acount_invoice code), the rec_name of invoice_line is (most of the time) the product name18:13
dfamoratobechamel: Ok... i am trying to assimilate it18:13
dfamoratobechamel: I can understand for the function fields...18:14
bechamelso if we are able to index *2many this way, it means it become possible to search for invoice based on product name18:14
dfamoratobechamel: but the many2one and *2many i think might be beyond the scope of what i understood on the full text search18:15
dfamoratobechamel: you want to be able to do a full text even in records internal lines ? Like each invoice line ?18:15
dfamoratobechamel: I completely understand the need to search on invoice.amount and invoice.customer18:16
dfamoratobechamel: but invoice lines ?18:16
bechameldfamorato: I agree with you if I think in a techincal point of view it18:18
dfamoratobechamel: And I also think that would make sphinx DB grow exponatially..... because we would have almost a "copy"  of our sphinx db18:19
bechamelbut for a user, when e see a document he does not care/know that data that are shown together are coming from separate table18:19
bechamelor let's put in another way: when I search google I want to query text from blog post but also from comments linked to (and shown with) the blog posts18:21
dfamoratobechamel: And in a sense... taking OE  for example... you can see all sales associated with that particular product... and that is independent of search, so I really don't think this should be implemented through sphinx ...18:22
-!- bvillasanti(~bvillasan@ has joined #tryton18:24
dfamoratobechamel: I think this relation should be done on the model itself.... Which is a feature I currently miss.... and like I said.. sphinx can be about 70% of the size of the original data source, so I don't have good feelings about indexing this data on sphinx18:24
bechameldfamorato: maybe indexing all *2many will create to much data18:24
dfamoratobechamel: I am postive that it will create to much data.18:24
bechamelthis can be handled later with a custom method that allow to push extra stuff18:25
bechamelbut let's concentrate on other stuff before18:25
dfamoratobechamel: yes... i agree... that can be done in an "advance sphinx integration" module if there is really a demand for that data18:26
dfamoratobechamel: but one thing i will do it because i missed it... implement the function field guessing using:    if isinstance(field, Function):18:27
bechameldfamorato: yes handling function field and many2one is easy18:28
dfamoratobechamel: great.. i will implement that and push to code review...18:29
bechameldfamorato: and btw getattr(record, field) can be replace with record[field], as __getitem__ is implemented on browse records18:29
dfamoratobechamel: is it faster ?18:29
cedkbechamel: I'm not sure to understand why you want to index many2one and many2many?18:30
bechameldfamorato: no it does change anything except code readability18:30
bechamel*does not18:30
bechamelcedk: because i want to search invoice per customer18:30
cedkbechamel: now you can already do that18:31
bechamelcedk: I can already do this with all other fields18:31
cedkbechamel: also with Many2One and Many2Many18:32
cedkbechamel: you can do:[('party', 'ilike', 'Foo%')])18:33
bechamelcedk: but I can search for every field without sphinx18:34
bechamelcedk: if we index char and int and float, why not indexing m2o ?18:34
cedkbechamel: the goals of sphinx is to do fulltext search18:35
cedkbechamel: otherwise we got index in the database18:35
bechamelcedk: to you want to index only field.Text18:36
cedkbechamel: I don't see any advantage for others18:36
bechamelcedk: and wat if i want[('party', 'ilike', '%Foo%')]) ? It's an easy query for sphinx but it is a full scan for postgresql18:37
bechamelanother point is: I saw several people reaction like "full text search is cool, I imagine I can search for 'Foo' and it will give me all the sale/invoice/case/... associated to Foo"18:39
cedkbechamel: for the search: just query sphinx to get parties that match and make a join in invoice table18:40
cedkbechamel: second, I don't think it is really useful to search for anything18:40
cedkbechamel: I think a business software needs semantic18:41
bechamelthis brings me to another point that I forgot, instead of defining precise index for each model in sphinx, what about defining just (id= int, model=string, data=string) and then create a text blob that merge all the text of the current record and make sphinx index it as one text18:42
cedkbechamel: I will create an entry for each data instead of merging all18:45
cedkbechamel: but the question is can we filter on data and model ?18:45
bechamelcedk: "search -c sphinx.conf -i product_template iphone"18:47
bechamelit comes from the README.md18:47
bechamel"I will create an entry for each data instead of merging all" -> ?18:47
cedkbechamel: instead of mergin all the text, I will create an entry for each text18:49
cedkbechamel: so we will have (id=int, model=string, field=sting, data=string)18:49
bechamelcedk: no18:50
bechamelcedk: all the content of all the fields will be merged into data18:51
cedkbechamel: why?18:51
cedkbechamel: better to have what I said, because you will be able to search on specific field value or not18:51
bechamelcedk: one unique schema in sphinx, so no need to update it when new modules are installed18:51
cedkbechamel: it is uniq schema18:52
bechamelcedk: I don't know how sphinx would handle that18:52
bechameldfamorato: any idea ?18:53
cedkbechamel: if it can handle you schema why not mine?18:53
dfamoratosorry guys, can you please make a clear question for me ?18:54
cedkdfamorato: what is allowed as schema for an index?18:54
dfamoratocedk: I still don't understand you .. you want to what data can be indexed ?18:56
cedkdfamorato: what is allowed as schema?18:57
dfamoratocedk: here is the a good example of how the xml must be formated in order to be indexed
cedkdfamorato: how many fields?18:57
dfamoratocedk: No limit in fields... as long as they are less then 2 MB18:57
cedkdfamorato: ok18:57
cedkdfamorato: can you filter on any field?18:58
dfamoratocedk: you can filter on attribute fields (which in our case is anything that is not text)18:58
cedkdfamorato: must the id be integer?18:59
bechamelis it possible to do something like "search -c sphinx.conf -i product_template name:iphone" to restrict the query to the name attribute ?18:59
dfamoratocedk: Yes, must be an unique integer, there is no workarround on that18:59
cedkdfamorato: sheet19:00
bechamelcedk: sheet ? :D19:00
cedkbechamel: typo19:00
cedkbechamel: it is not possible to do what you want nor mine19:00
dfamoratobechamel: is is possible to restrict bases on the index you are search for sure... I think is pretty possible to restric attribute..... let me confirm19:01
cedkbechamel: because id must be int so we must have a index per model19:01
bechamelwhat about the product_template in the example, this means that the document type is handled19:02
dfamoratobechamel: it is possible to set filter based on attribute -->
cedkbechamel: it is the index name19:03
dfamoratoi used model name = to index name19:04
bechamelfound this:  "hello world" @title "example program"19:05
bechamelwhich does full text search on "hello world" and also filter for "example program" in the title attribute19:06
dfamoratobechamel: yes... it's possible as well... field search operator:  @title hello @body world19:06
dfamoratoor maybe multiple-field search operator: @(title,body) hello world19:07
dfamoratothere are a lot of possible possible syntaxes =
bechameloh and btw, we shouldn't restrict indexing to the fields with select=1, but index everytinh19:09
bechamelI have to leave, see you later19:10
cedkdfamorato: do you think it is possible to store all data into 1 index?19:17
cedkdfamorato: like bechamel said19:18
cedkfor me it is not possible because id must be unique and integer19:18
dfamoratocedk: i don't think it is and i don19:18
dfamoratoi also don't see the benefit19:18
dfamoratocedk: we don't need to specify which index to search... we can just search accross all of them19:19
cedkdfamorato: and how does it manage different schema when searching accross indexes?19:22
dfamoratocedk: you mean filtering through a schema attributes or just plain search...19:23
dfamoratocedk: if it's plain search, it look for the "field" in the schema and tries to match it... now if we are setting a filter based on the attribues, i am not sure how it's going to work19:24
cedkdfamorato: the other disavantage of having one index per model is that you must define it in the configuration file which need to be updated when installing new module in Tryton19:25
dfamoratocedk:  i don't see that as a big drawback, since there is a19:26
dfamoratocedk: "sphinx conf generator"19:26
cedkdfamorato: but it doesn't keep custom change you did in the configuration19:27
dfamoratocedk: In, as i see it.... people shouldn't be installing modules out of nowhere......19:27
cedkdfamorato: and by default, generated configuration is bad19:27
dfamoratocedk: maybe i can have the conf build "update"  a configuration if one exists..19:27
dfamoratocedk:  the only thing i need to to is echo a new source and index into that configuration is a news module is added19:28
cedkdfamorato: yes but the only reason to have many indexes it is because id must be integer19:29
dfamoratocedk: well, also another good reason is to search ONLY on a specific index when you want... or rebuildind a specific index from scratch if needed in any case19:31
dfamoratocedk: I know that searching in a specific index can be solved if we use a field telling the model name... but i don't see any drawback of using multiple indexes... i only see advandatges19:32
dfamoratocedk: which also includes distributed search, since we can have indexes in other machines19:33
cedkdfamorato: can you create index on the fly?19:36
dfamoratocedk: after you put it into sphinx.conf just run indexer -i index_name...  the data will be indexed19:37
cedkdfamorato: without puting it in conf19:38
-!- smarro_( has joined #tryton19:39
dfamoratocant't be done19:43
-!- jcm( has joined #tryton19:45
-!- bechamel( has joined #tryton19:45
dfamoratocedk: I am starving... any further questions before i leave for lunch ?19:46
bechamelcedk: another remark, it should be nice to provide auto-completion on each field value in the new search widget19:46
bechamelcedk: so "name:bertra", will trigger a sphinx search on the name field and suggest bertrand19:47
bechameldfamorato: I have another question :)19:47
dfamoratobechamel: sure19:47
bechameldfamorato: the xmlpipe doc talk about "arbitrary full-text and attribute data"19:47
bechameldfamorato: is the per-model schema needed when we use only xmlpipe to index stuff ?19:48
dfamoratobechamel: if you send data that is not declared on the xml schema, the additional data will not be considered19:48
dfamoratobechamel: yes... per model schema is needed because we don't define it on sphinx.conf.... so we do need to do it on the xml stream19:49
bechameldfamorato: it says "It also allows to specify the schema (ie. the set of fields and attributes) either in the XML stream itself, or in the source settings"19:50
-!- peju(~moore@ has joined #tryton19:50
-!- peju(~moore@ has left #tryton19:51
dfamoratobechamel: just like i said... you can either use sphinx.conf or the xml stream.... i prefered to use the xml stream because it's easier to update the indexed fields without the need to update the conf file19:52
bechameldfamorato: not having to re-generate config when modules are installed would be really nice19:52
bechameldfamorato: the easier to use, the best it is19:52
dfamoratobechamel: i told cedk that i could just echo the new source and index settings into the conf file in case a conf file exists19:52
dfamoratobechamel: so, that way, the conf file would always maintain any customization made to it19:53
dfamoratobechamel: now my question to you guys is.... Is it possible for me to inherit the "module installation/upgrade" process and add an addition step to it which would call my sphinx-conf-updater each time a new module is installed19:55
dfamoratobechamel: because if that is possible, I think i makes it "fool-proof" enought :)19:56
bechameldfamorato: I don't think this part of the code support inheritance/extension, but if we hare happy with the fulltext search we can integrate it on the base code and allow is usage based on the config file19:58
dfamoratobechamel: awesome...19:58
-!- peju(~moore@ has joined #tryton19:58
pejuhi all19:58
bechameldfamorato: IMO you shouldn't bother too much on integration with the base, we can do it later19:58
dfamoratobechamel: I was just tryting to find a solution for you requests about the "new module" scenario19:59
bechameldfamorato: yes, but imo this is the plan B, plan A being updating schema using the api and not the config file20:00
dfamoratobechamel: I don't see how to implement PLAN A unless we put everything into just 1 index.... Which I am strongly  against20:04
-!- pjstevns( has joined #tryton20:06
-!- pjstevns( has left #tryton20:06
dfamoratobechamel: more questions before I go ?  I should be back in 1 hour20:07
bechameldfamorato: no, enjoy your meal20:09
dfamoratobechamel: thanks... when I come back, i would like to address the concerns of the code review.... Talk to you soon20:10
bechameldfamorato: ok, maybe i will be away for supper when you come back, but anyway most of the codereview remarks are from cedk :)20:11
-!- peju(~moore@ has left #tryton20:12
cedkbechamel: did you understand that it is not possible to use one index because id must be unique20:15
cedkbechamel: and int20:15
-!- sharkcz(~sharkcz@2001:15c0:6747:160::7) has joined #tryton20:19
-!- okko1( has joined #tryton20:20
cedkgot an idea instead of generating the conf file with all the sources20:23
cedkwe could just let the user define in this conf file what he wants to index20:24
cedkso when sphinx starts the xmlpipe_command, we store that it is indexing the defined Model20:24
cedklike that we can substitude ilike search only for indexed Model20:25
cedkand as xmlpipe2 doesn't need the fields or attributes, the conf is simple20:27
-!- helmor( has joined #tryton20:28
-!- plantian1( has joined #tryton20:31
-!- dba_(~daniel@ has joined #tryton20:32
-!- sebastian__( has joined #tryton20:33
-!- peju(~moore@ has joined #tryton20:44
pejuwhat IDE would you suggest for tryton development?20:45
pejui need it to do basic stuff like add fields in already existing modules20:45
-!- peju(~moore@ has left #tryton20:56
dfamoratocedk: bechamel: I'm back21:09
dfamoratocedk: There is a tryton module which allows to select which models are supposed to be indexed..21:10
dfamoratocedk: you can select product.product or product.category and so on21:10
dfamoratocedk:  after that you are supposed to run sphinx conf generator...21:11
cedkdfamorato: I thought it could be the opposite21:11
dfamoratocedk: sorry for not putting that on the readme... I will update documentation as well with th concerns on code review21:11
cedkdfamorato: like that there is no misconfiguration21:12
dfamoratocedk: You mean index all via sphinx by default ?21:12
cedkdfamorato: no I mean define what is indexed in sphinx conf only21:14
dfamoratocedk: having the user (integrador/admin..) define each model manually on sphinx config file ?21:16
cedkdfamorato: yes21:16
cedkdfamorato: and when sphinx query Tryton then you store the index in Tryton to know that you can use21:17
dfamoratocedk: sincerely, I think it's too cumbersome.... as it would force the user to know which model they should index21:18
dfamoratocedk: when I think it can be easily definable from the gtk client from a list21:19
cedkdfamorato: but your design can be broken in many places21:19
cedkdfamorato: with mine not because there is only one place where stuff are defined21:20
cedkmoreover it should be not so complicated to create source because it is just 2 lines21:20
cedkalso I think technical configuration doesn't have to be done in GTK client21:22
cedkespecially if the user still have to run a script on the server side21:23
dfamoratocedk: I think I could create a wizard which would guide the person to perform the required tasks, just like happens on setting up the chart of accounts and so on21:25
cedkdfamorato: it is not the same stuffs21:25
cedkdfamorato: chart of account is business configuration, sphinx is technical configuration21:26
cedkit is just like you can not create index in postgresql from the GTK client21:29
dfamoratocedk: And from that we would make the user input what needs to indexed from a 200 possibilities of the models21:30
cedkdfamorato: but indeed there is only few Models that are useful to index21:32
cedkdfamorato: like product, party, sale, invoice etc.21:32
helmorsee my new shirt, python 4 ever .. i wear every week once :-)
helmor>>> from __future__ import braces21:33
helmorSyntaxError: not a chance21:33
-!- hoRn( has joined #tryton21:37
dfamoratocedk: but about 1 hour ago, from what I understood from Bertrand, we should index Everything and All things, now we restrict to some things ?21:38
-!- cedk_( has joined #tryton21:39
dfamoratobechamel: ping21:39
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton21:39
bechameldfamorato: pong21:44
dfamoratobechamel: sorry to bother you at night... cedk was directing me to one path and I would like you to participate on that as well, specially because I think it complicates the usage a little bit21:46
dfamoratobechamel: Would you mind check the last 30 min of irc history ?21:46
-!- vladimirek( has joined #tryton21:49
bechameldfamorato: cedk idea is good because it's always better to have only one source of knowledge, but I also think it's raise other problems21:50
bechamelimo having sphinx indexing will trigger new idea and new usage this is why I push for indexing everything because it will allow to build feature on top of it21:51
bechamelindexing only some field wil means that if I want to add feature on top of fts I have to know which field is indexed an which is not, and that an unnecessary compliquation21:52
dfamoratobechamel: ok, Both you and cedk are my mentors and also the project lead. I will then implement you recomendation in setting which models to be indexed manually21:55
cedkbechamel: no because with xmlpipe2 the schema can be send21:55
cedkbechamel: so a module could extend it21:55
dfamoratocedk:  bechamel: now the question is, which of the conf files will we store which models to index ?21:56
bechameldfamorato: IMO the first step is ti handle function feild (this will give us some time to think about other stuffs)21:56
dfamoratocedk: bechamel: Sphinx.conf or trytond.conf ?21:56
cedkdfamorato: sphinx21:56
dfamoratobechamel: i think the function field will be easy to implement21:56
dfamoratoi will test and let you guys know21:57
bechamelcedk: how do you want to extend config with modules ? you want to define schema statically in the sphinx config.21:57
cedkbechamel: I don't want to define the schema in shpinx config but in the xml send to it21:58
bechamelcedk: ok but where to define which field to index ?21:59
cedkbechamel: Tryton will find it22:00
cedkbechamel: I propose as a first start to put only Char as field22:00
bechamelcedk: ok, I agree with ugins xmlpipe to define schema22:01
bechamelcedk: dfamorato: a question I have is that there is one index per model, so  where do we tell sphinx which model/index are we using ?22:02
cedkbechamel: with -i22:02
dfamoratobechamel: If you don't specify which index you are using, it will search across all indexes22:03
cedkbechamel: but he said that you can also query on all indexes22:03
bechamelI'm talking about indexing (not querying)22:03
dfamoratobechamel: same thing...22:03
dfamoratobechamel:  -i index_name22:04
dfamoratobechamel: or --all to reindex all22:04
cedkdfamorato: it is not sphinx who trigger the indexing query?22:07
dfamoratocedk: nop, must be manual or via a cron22:07
bechamelI see that it's specified in the config generated by configuration.py22:08
cedkdfamorato: and then sphinx run the xmlpipe_command?22:08
bechamelcedk: so we are ok that we can define schema trough xml, but we still need to give sphinx the list of model names22:09
dfamoratocedk: because that is what generates the xml stream22:10
cedkbechamel: yes user must add in sphinx.conf the source definition22:10
dfamoratocedk: when we run the indexer, it calls whatver command (or SQL Query in the case of SQL datasource) is defined into the sphinx.conf and starts indexing data22:11
cedkdfamorato: ok I understand22:11
dfamoratobechamel: if we define schema through xml, good, no need to change my current design :)22:12
cedkdfamorato: I think it is better to put the schema code in the tryton module22:13
dfamoratocedk: I don't understand... please explain22:14
bechamelso the config is simply a list of model on which we want indexing, sound simple22:14
bechamelthe question is : is sphinx api if we change the schema that is pushed trough xml ? (I.E. indexing stuff before and after module install)22:18
cedkdfamorato: for now you generate the XML in a script that is run by sphinx22:19
cedkdfamorato: this script call trytond to get data22:19
cedkdfamorato: I think it is better that the script just call a method on trytond and trytond return the complete XML22:20
dfamoratocedk: I did the way it's done today because you guys requested that
cedkdfamorato: but it doesn't say that all the code must be in the script22:25
cedkdfamorato: it is more modular if the xml creation is done in the module because you can override it easily22:25
dfamoratocedk: I can't imagine any specific reason why we should overwrite the xml creation22:28
cedkalso that's why we asked to every students to upload code in early stage because the dev process is made of iteration22:28
cedkdfamorato: I got many22:28
cedkdfamorato: a module that will add extra field to index22:28
dfamoratocedk: aren't all fields supposed to be indexed ?22:29
cedkdfamorato: a module that will add different language on the same record22:29
cedkdfamorato: for now only Char22:29
dfamoratocedk: Wasn't i supposed to create a different index by each language ?22:30
cedkdfamorato: yes but you don't know what other people will need22:30
dfamoratocedk:  specially because of the morphology and stemming process, they are different for each language, and therefore, each index must be diffenret for each language22:30
cedkdfamorato: yes but you don't know what will be the usage of other people22:31
cedkwe work like that in Tryton, because it is about framework22:31
dfamoratocedk: and today, char, text and selection are full text indexable22:32
dfamoratocedk: So you want the xml stream generator to be put into the tryton module ?22:34
cedkdfamorato: yes22:34
cedkACTION bbl22:35
dfamoratocedk:  and what  else should this module do ?22:35
-!- woakas(~woakas@ has joined #tryton22:37
cedkACTION 22:40
cedkdfamorato: there is still the random crawler22:41
cedkdfamorato: I don't know how you can manage it but perhaps the module should return some more random records22:41
cedkdfamorato: also I think you should try to use proteus to query the server like that you will get direct import and xml-rpc22:42
-!- ciupicri(~ciupicri@ has joined #tryton22:56
dfamoratocedk: bechamel: ping23:38
bechameldfamorato: pong23:41
dfamoratoi have updated the code to implement some of the things we discussed today23:42
dfamoratobechamel: pushed to code review23:42
bechameldfamorato: ok23:44
bechameldfamorato: I will check it tomorrow23:45

Generated by 2.11.0 by Marius Gedminas - find it at!