IRC logs of #tryton for Friday, 2011-08-19

chat.freenode.net #tryton log beginning Fri Aug 19 00:00:02 CEST 2011
2011-08-19 01:11 -!- ikks_(~ikks@190.25.172.191) has joined #tryton
2011-08-19 02:50 -!- meanmicio(~lfm@190.195.50.15) has joined #tryton
2011-08-19 03:36 -!- elbenfreund1(~elbenfreu@p54B9299F.dip.t-dialin.net) has joined #tryton
2011-08-19 03:44 -!- sebamarro(~sebastian@190.173.162.185) has joined #tryton
2011-08-19 04:53 -!- alimon(alimon@189.154.55.187) has joined #tryton
2011-08-19 04:59 -!- plantian(~ian@c-67-169-72-36.hsd1.ca.comcast.net) has joined #tryton
2011-08-19 06:48 -!- smarro_(~sebastian@190.51.101.48) has joined #tryton
2011-08-19 07:00 -!- helmor(~helmo@2.209.191.193) has joined #tryton
2011-08-19 07:36 -!- cedk(~ced@gentoo/developer/cedk) has joined #tryton
2011-08-19 07:37 -!- okko1(~okko@dhcp-077-251-140-095.chello.nl) has joined #tryton
2011-08-19 08:21 -!- hoRn(~jan@dslb-178-005-199-147.pools.arcor-ip.net) has joined #tryton
2011-08-19 08:57 -!- pjstevns(~pjstevns@helpoort.xs4all.nl) has joined #tryton
2011-08-19 08:57 -!- pjstevns(~pjstevns@helpoort.xs4all.nl) has left #tryton
2011-08-19 09:17 -!- helmor(~helmo@109.250.168.233) has joined #tryton
2011-08-19 09:25 -!- nicoe(~nicoe@ced.homedns.org) has joined #tryton
2011-08-19 09:28 -!- pjstevns(~pjstevns@a83-163-46-103.adsl.xs4all.nl) has joined #tryton
2011-08-19 09:28 -!- jcm(~jcm@99.12.194.77.rev.sfr.net) has joined #tryton
2011-08-19 09:30 -!- vladimirek(~vladimire@adsl-dyn18.91-127-76.t-com.sk) has joined #tryton
2011-08-19 09:41 -!- helmor(~helmo@46.115.26.7) has joined #tryton
2011-08-19 09:45 -!- okko1(~okko@62.58.29.41) has joined #tryton
2011-08-19 09:49 -!- enlightx(~enlightx@static-217-133-61-144.clienti.tiscali.it) has joined #tryton
2011-08-19 09:56 -!- bechamel(~user@cismwks02-virtual1.cism.ucl.ac.be) has joined #tryton
2011-08-19 10:12 -!- reichlich(~reichlich@p578E8BC7.dip.t-dialin.net) has joined #tryton
2011-08-19 10:34 -!- ccomb(~ccomb@vau75-2-81-57-244-84.fbx.proxad.net) has joined #tryton
2011-08-19 11:10 -!- helmor(~helmo@109.250.44.168) has joined #tryton
2011-08-19 11:13 -!- reichlich_(~reichlich@p578E8F27.dip.t-dialin.net) has joined #tryton
2011-08-19 11:35 -!- ccomb(~ccomb@anj75-1-82-226-210-96.fbx.proxad.net) has joined #tryton
2011-08-19 12:27 -!- ndn_pit(~ndn_pit@95.56.33.246) has joined #tryton
2011-08-19 12:28 <ndn_pit> where should I pass URL like "tryton://<hostname>[:<port>]/<database>/model/<model name>[/<id>][;parameters]"?
2011-08-19 12:28 <ndn_pit> hello :)
2011-08-19 12:29 <cedk> ndn_pit: as argument of the tryton client
2011-08-19 12:30 <ndn_pit> can you give me example?
2011-08-19 12:31 <nicoe> ./bin/tryton tryton://localhost/demo/party.party/1
2011-08-19 12:31 <ndn_pit> thank you
2011-08-19 12:32 <cedk> ndn_pit: ./bin/tryton tryton://demo2.0.tryton.org/demo2.0/model/party.party
2011-08-19 12:32 <cedk> ndn_pit: it works on the demo server
2011-08-19 12:32 <ndn_pit> understand
2011-08-19 12:33 <ndn_pit> understood thanks
2011-08-19 12:37 <ndn_pit> if I should pass it from my external softphone, then why should I specify db?
2011-08-19 12:39 <ndn_pit> i mean: db name may be chage sometimes
2011-08-19 12:39 <ndn_pit> change*
2011-08-19 12:39 <nicoe> tryton supports more then one database, you should tell him which db to use
2011-08-19 12:39 <cedk> ndn_pit: the database name is in the URL
2011-08-19 12:40 <ndn_pit> "ndn_pit: the database name is in the URL" it's exactly what i don't want )
2011-08-19 12:41 <ndn_pit> I think it's impossible, am i right?
2011-08-19 12:41 <cedk> ndn_pit: it is impossible because it really depends on the database name
2011-08-19 12:42 <ndn_pit> ok thanks
2011-08-19 12:42 <cedk> ndn_pit: let say you want to open the Party form of the calling number, the id of the Party is linked to the database
2011-08-19 12:42 <ndn_pit> yes
2011-08-19 12:43 <ndn_pit> but my db name can change in the future
2011-08-19 12:43 <ndn_pit> but clients count may be 100
2011-08-19 12:43 <ndn_pit> i mean operator count
2011-08-19 12:44 <nicoe> why would your db name change ?
2011-08-19 12:45 <ndn_pit> I never know what will happen
2011-08-19 12:46 <cedk> ndn_pit: I really don't see why you will change the name of the database
2011-08-19 12:46 <cedk> ndn_pit: it is like the hostname of the server
2011-08-19 12:48 <ndn_pit> ok may be I wrong, I just want to consider all situations
2011-08-19 12:51 -!- ndn_pit(~ndn_pit@95.56.33.246) has left #tryton
2011-08-19 13:23 -!- vladimirek(~vladimire@adsl-dyn18.91-127-76.t-com.sk) has joined #tryton
2011-08-19 13:29 <hoRn> can 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 http://pastie.org/2396236
2011-08-19 13:38 <hoRn> I am stupid
2011-08-19 13:47 -!- hoRn(~jan@dslb-178-005-199-147.pools.arcor-ip.net) has left #tryton
2011-08-19 14:04 -!- jcm(~jcm@99.12.194.77.rev.sfr.net) has joined #tryton
2011-08-19 15:30 -!- sharkcz(~sharkcz@2001:15c0:6747:160::7) has joined #tryton
2011-08-19 15:37 -!- smarro_(~sebastian@186.140.46.202) has joined #tryton
2011-08-19 15:38 -!- sisalp(~dominique@annecy.sisalp.net) has joined #tryton
2011-08-19 15:46 -!- nicoe(~nicoe@ced.homedns.org) has joined #tryton
2011-08-19 15:48 -!- ccomb(~ccomb@anj75-1-82-226-210-96.fbx.proxad.net) has joined #tryton
2011-08-19 15:53 -!- sisalp(~dominique@annecy.sisalp.net) has left #tryton
2011-08-19 15:57 -!- saxa(~sasa@189.26.255.43) has joined #tryton
2011-08-19 16:01 -!- enlightx(~enlightx@static-217-133-61-144.clienti.tiscali.it) has joined #tryton
2011-08-19 16:10 -!- zodman(~zodman@foresight/developer/zodman) has joined #tryton
2011-08-19 16:20 -!- bvillasanti(~bvillasan@190.105.104.98) has joined #tryton
2011-08-19 16:28 -!- alimon(alimon@189.154.55.187) has joined #tryton
2011-08-19 16:29 -!- gremly(~gremly@200.106.218.64) has joined #tryton
2011-08-19 16:31 -!- bvillasanti(~bvillasan@190.105.104.98) has left #tryton
2011-08-19 17:10 -!- pjstevns(~pjstevns@a83-163-46-103.adsl.xs4all.nl) has left #tryton
2011-08-19 17:35 -!- redarmy(~Miranda@180.113.221.97) has joined #tryton
2011-08-19 17:36 <redarmy> is email integration ready? just see someone chat it in the irclog.
2011-08-19 17:39 -!- dfamorato(~dfamorato@2001:470:5:630:7815:60cb:36a6:d75b) has joined #tryton
2011-08-19 17:39 -!- sharoon(~sharoon@204-232-205-248.static.cloud-ips.com) has joined #tryton
2011-08-19 17:39 <dfamorato> bechamel: ping
2011-08-19 17:41 <bechamel> dfamorato: ping
2011-08-19 17:41 <dfamorato> bechamel: pong
2011-08-19 17:41 <bechamel> *pong :)
2011-08-19 17:41 <dfamorato> bechamel: Hi there ...
2011-08-19 17:41 <dfamorato> bechamel:
2011-08-19 17:41 <nicoe> redarmy: no email integration. I hope discuss it at the unconference and maybe have some poc later
2011-08-19 17:41 <bechamel> dfamorato: Hi
2011-08-19 17:41 <dfamorato> bechamel: I see you had time to do some review on my code
2011-08-19 17:42 <bechamel> dfamorato: yes
2011-08-19 17:42 <dfamorato> bechamel: A lot of code is spent on building the correct config... because this is crucial
2011-08-19 17:42 <bechamel> dfamorato: yes I know
2011-08-19 17:43 <dfamorato> bechamel: but then, my intention is to have a cron which will add and remove records to the index
2011-08-19 17:43 <dfamorato> bechamel: any id's changed on the tryton side are stored to be added / removed from sphinx side
2011-08-19 17:44 <bechamel> dfamorato: but it as several drawback, the main one being supporting all type of field
2011-08-19 17:44 <bechamel> dfamorato: example, what append if I want to search invoices for customer "Doe"
2011-08-19 17:44 <dfamorato> bechamel: sorry, i don't understand what is the drawback
2011-08-19 17:45 <dfamorato> bechamel: No problem, we index all fields
2011-08-19 17:45 <bechamel> dfamorato: what about many2one ?
2011-08-19 17:45 <bechamel> or even {many,one}2many
2011-08-19 17:46 <dfamorato> bechamel: many to one takes as attrtibues....
2011-08-19 17:47 <dfamorato> bechamel: My code takes in consideration the function fields and so on....
2011-08-19 17:47 <dfamorato> bechamel: Based on the context of the user
2011-08-19 17:47 <bechamel> dfamorato: let me check
2011-08-19 17:48 <dfamorato> bechamel: so.. in order to index trasnlation, we would have to create a user for each installed language...
2011-08-19 17:48 <dfamorato> bechamel: and set the language per user
2011-08-19 17:49 <dfamorato> bechamel: 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 functionality
2011-08-19 17:49 -!- okko1(~okko@dhcp-077-251-140-095.chello.nl) has joined #tryton
2011-08-19 17:49 <dfamorato> bechamel: That's why you see SQL and XML there
2011-08-19 17:50 <bechamel> dfamorato: where function fields are hanled ?
2011-08-19 17:50 <dfamorato> bechamel: let me open it and i will let you knwo
2011-08-19 17:52 <dfamorato> bechamel: https://github.com/dfamorato/tryton_sphinx/blob/experimental/bin/xmlpipe2_trytond#L44
2011-08-19 17:54 <dfamorato> bechamel: above it gets the user context
2011-08-19 17:54 <dfamorato> bechamel: and here i get all fields available to this user https://github.com/dfamorato/tryton_sphinx/blob/experimental/api/utils.py#L109
2011-08-19 17:55 <bechamel> dfamorato: yes but guess_type only handles date, integer, string, float and boolean
2011-08-19 17:56 <bechamel> dfamorato: it miss function fields and relation fields
2011-08-19 17:58 <dfamorato> bechamel: i think you are right....
2011-08-19 17:59 <dfamorato> bechamel: but here is what i think it can be done
2011-08-19 18:00 <dfamorato> bechamel: 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...
2011-08-19 18:00 <bechamel> dfamorato: yes
2011-08-19 18:00 <dfamorato> bechamel: so, what if i check if isinstance(field, Function): and then return guess_xml_type(field._field)
2011-08-19 18:01 <dfamorato> bechamel: I think that would work
2011-08-19 18:01 <bechamel> dfamorato: yes and many2one must be also easy
2011-08-19 18:02 <dfamorato> bechamel: any ideas to help me on that ?
2011-08-19 18:02 <bechamel> dfamorato: but for them you must index getattr(record, field).rec_name
2011-08-19 18:02 <bechamel> instead of getattr(record, field)
2011-08-19 18:03 <bechamel> and it's basically a string
2011-08-19 18:03 <bechamel> dfamorato: *2many are also doable but I dont know if it's supported by sphinx
2011-08-19 18:04 <dfamorato> bechamel: You mean index .rec_name on the "Char, Text, Selection" fields right ?
2011-08-19 18:05 <dfamorato> bechamel: I think they are not --> http://sphinxsearch.com/docs/2.0.1/xmlpipe2.html
2011-08-19 18:05 <bechamel> dfamorato: let's say I want to index invoice
2011-08-19 18:05 <bechamel> invoice.amount is a float
2011-08-19 18:06 <bechamel> but invoice.cutomer is an object
2011-08-19 18:07 <bechamel> so 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 opened
2011-08-19 18:07 <dfamorato> bechamel: ok, i get it
2011-08-19 18:08 <bechamel> so for *2many, from a tryton perspective we could do a loop on the related record
2011-08-19 18:09 <bechamel> for rec in invoice.lines: stream.write("..." % (..., rec.rec_name,))
2011-08-19 18:11 <bechamel> but I don't know if sphinx can index a variable list of text for a same record
2011-08-19 18:11 <bechamel> dfamorato: ^
2011-08-19 18:13 <bechamel> and in my example (and after reading the acount_invoice code), the rec_name of invoice_line is (most of the time) the product name
2011-08-19 18:13 <dfamorato> bechamel: Ok... i am trying to assimilate it
2011-08-19 18:14 <dfamorato> bechamel: I can understand for the function fields...
2011-08-19 18:14 <bechamel> so if we are able to index *2many this way, it means it become possible to search for invoice based on product name
2011-08-19 18:15 <dfamorato> bechamel: but the many2one and *2many i think might be beyond the scope of what i understood on the full text search
2011-08-19 18:15 <dfamorato> bechamel: you want to be able to do a full text even in records internal lines ? Like each invoice line ?
2011-08-19 18:16 <dfamorato> bechamel: I completely understand the need to search on invoice.amount and invoice.customer
2011-08-19 18:16 <dfamorato> bechamel: but invoice lines ?
2011-08-19 18:18 <bechamel> dfamorato: I agree with you if I think in a techincal point of view it
2011-08-19 18:19 <dfamorato> bechamel: And I also think that would make sphinx DB grow exponatially..... because we would have almost a "copy" of our sphinx db
2011-08-19 18:19 <bechamel> but for a user, when e see a document he does not care/know that data that are shown together are coming from separate table
2011-08-19 18:21 <bechamel> or 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 posts
2011-08-19 18:22 <dfamorato> bechamel: 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 ...
2011-08-19 18:24 -!- bvillasanti(~bvillasan@190.105.89.122) has joined #tryton
2011-08-19 18:24 <dfamorato> bechamel: 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 sphinx
2011-08-19 18:24 <bechamel> dfamorato: maybe indexing all *2many will create to much data
2011-08-19 18:24 <dfamorato> bechamel: I am postive that it will create to much data.
2011-08-19 18:25 <bechamel> this can be handled later with a custom method that allow to push extra stuff
2011-08-19 18:25 <bechamel> but let's concentrate on other stuff before
2011-08-19 18:26 <dfamorato> bechamel: yes... i agree... that can be done in an "advance sphinx integration" module if there is really a demand for that data
2011-08-19 18:27 <dfamorato> bechamel: but one thing i will do it because i missed it... implement the function field guessing using: if isinstance(field, Function):
2011-08-19 18:28 <bechamel> dfamorato: yes handling function field and many2one is easy
2011-08-19 18:29 <dfamorato> bechamel: great.. i will implement that and push to code review...
2011-08-19 18:29 <bechamel> dfamorato: and btw getattr(record, field) can be replace with record[field], as __getitem__ is implemented on browse records
2011-08-19 18:29 <dfamorato> bechamel: is it faster ?
2011-08-19 18:30 <cedk> bechamel: I'm not sure to understand why you want to index many2one and many2many?
2011-08-19 18:30 <bechamel> dfamorato: no it does change anything except code readability
2011-08-19 18:30 <bechamel> *does not
2011-08-19 18:30 <bechamel> cedk: because i want to search invoice per customer
2011-08-19 18:31 <cedk> bechamel: now you can already do that
2011-08-19 18:31 <bechamel> cedk: I can already do this with all other fields
2011-08-19 18:32 <cedk> bechamel: also with Many2One and Many2Many
2011-08-19 18:33 <cedk> bechamel: you can do: invoice_obj.search([('party', 'ilike', 'Foo%')])
2011-08-19 18:34 <bechamel> cedk: but I can search for every field without sphinx
2011-08-19 18:34 <bechamel> cedk: if we index char and int and float, why not indexing m2o ?
2011-08-19 18:35 <cedk> bechamel: the goals of sphinx is to do fulltext search
2011-08-19 18:35 <cedk> bechamel: otherwise we got index in the database
2011-08-19 18:36 <bechamel> cedk: to you want to index only field.Text
2011-08-19 18:36 <cedk> bechamel: I don't see any advantage for others
2011-08-19 18:37 <bechamel> cedk: and wat if i want invoice_obj.search([('party', 'ilike', '%Foo%')]) ? It's an easy query for sphinx but it is a full scan for postgresql
2011-08-19 18:39 <bechamel> another 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"
2011-08-19 18:40 <cedk> bechamel: for the search: just query sphinx to get parties that match and make a join in invoice table
2011-08-19 18:40 <cedk> bechamel: second, I don't think it is really useful to search for anything
2011-08-19 18:41 <cedk> bechamel: I think a business software needs semantic
2011-08-19 18:42 <bechamel> this 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 text
2011-08-19 18:45 <cedk> bechamel: I will create an entry for each data instead of merging all
2011-08-19 18:45 <cedk> bechamel: but the question is can we filter on data and model ?
2011-08-19 18:47 <bechamel> cedk: "search -c sphinx.conf -i product_template iphone"
2011-08-19 18:47 <bechamel> it comes from the README.md
2011-08-19 18:47 <bechamel> "I will create an entry for each data instead of merging all" -> ?
2011-08-19 18:49 <cedk> bechamel: instead of mergin all the text, I will create an entry for each text
2011-08-19 18:49 <cedk> bechamel: so we will have (id=int, model=string, field=sting, data=string)
2011-08-19 18:50 <bechamel> cedk: no
2011-08-19 18:51 <bechamel> cedk: all the content of all the fields will be merged into data
2011-08-19 18:51 <cedk> bechamel: why?
2011-08-19 18:51 <cedk> bechamel: better to have what I said, because you will be able to search on specific field value or not
2011-08-19 18:51 <bechamel> cedk: one unique schema in sphinx, so no need to update it when new modules are installed
2011-08-19 18:52 <cedk> bechamel: it is uniq schema
2011-08-19 18:52 <bechamel> cedk: I don't know how sphinx would handle that
2011-08-19 18:53 <bechamel> dfamorato: any idea ?
2011-08-19 18:53 <cedk> bechamel: if it can handle you schema why not mine?
2011-08-19 18:54 <dfamorato> sorry guys, can you please make a clear question for me ?
2011-08-19 18:54 <cedk> dfamorato: what is allowed as schema for an index?
2011-08-19 18:56 <dfamorato> cedk: I still don't understand you .. you want to what data can be indexed ?
2011-08-19 18:57 <cedk> dfamorato: what is allowed as schema?
2011-08-19 18:57 <dfamorato> cedk: here is the a good example of how the xml must be formated in order to be indexed http://sphinxsearch.com/docs/2.0.1/xmlpipe2.html
2011-08-19 18:57 <cedk> dfamorato: how many fields?
2011-08-19 18:57 <dfamorato> cedk: No limit in fields... as long as they are less then 2 MB
2011-08-19 18:57 <cedk> dfamorato: ok
2011-08-19 18:58 <cedk> dfamorato: can you filter on any field?
2011-08-19 18:58 <dfamorato> cedk: you can filter on attribute fields (which in our case is anything that is not text)
2011-08-19 18:59 <cedk> dfamorato: must the id be integer?
2011-08-19 18:59 <bechamel> is it possible to do something like "search -c sphinx.conf -i product_template name:iphone" to restrict the query to the name attribute ?
2011-08-19 18:59 <dfamorato> cedk: Yes, must be an unique integer, there is no workarround on that
2011-08-19 19:00 <cedk> dfamorato: sheet
2011-08-19 19:00 <bechamel> cedk: sheet ? :D
2011-08-19 19:00 <cedk> bechamel: typo
2011-08-19 19:00 <cedk> bechamel: it is not possible to do what you want nor mine
2011-08-19 19:01 <dfamorato> bechamel: is is possible to restrict bases on the index you are search for sure... I think is pretty possible to restric attribute..... let me confirm
2011-08-19 19:01 <cedk> bechamel: because id must be int so we must have a index per model
2011-08-19 19:02 <bechamel> what about the product_template in the example, this means that the document type is handled
2011-08-19 19:03 <dfamorato> bechamel: it is possible to set filter based on attribute --> http://sphinxsearch.com/docs/2.0.1/matching-modes.html
2011-08-19 19:03 <cedk> bechamel: it is the index name
2011-08-19 19:04 <dfamorato> i used model name = to index name
2011-08-19 19:05 <bechamel> found this: "hello world" @title "example program"
2011-08-19 19:06 <bechamel> which does full text search on "hello world" and also filter for "example program" in the title attribute
2011-08-19 19:06 <dfamorato> bechamel: yes... it's possible as well... field search operator: @title hello @body world
2011-08-19 19:07 <dfamorato> or maybe multiple-field search operator: @(title,body) hello world
2011-08-19 19:07 <dfamorato> there are a lot of possible possible syntaxes = http://sphinxsearch.com/docs/2.0.1/extended-syntax.html
2011-08-19 19:09 <bechamel> oh and btw, we shouldn't restrict indexing to the fields with select=1, but index everytinh
2011-08-19 19:10 <bechamel> I have to leave, see you later
2011-08-19 19:17 <cedk> dfamorato: do you think it is possible to store all data into 1 index?
2011-08-19 19:18 <cedk> dfamorato: like bechamel said
2011-08-19 19:18 <cedk> for me it is not possible because id must be unique and integer
2011-08-19 19:18 <dfamorato> cedk: i don't think it is and i don
2011-08-19 19:18 <dfamorato> i also don't see the benefit
2011-08-19 19:19 <dfamorato> cedk: we don't need to specify which index to search... we can just search accross all of them
2011-08-19 19:22 <cedk> dfamorato: and how does it manage different schema when searching accross indexes?
2011-08-19 19:23 <dfamorato> cedk: you mean filtering through a schema attributes or just plain search...
2011-08-19 19:24 <dfamorato> cedk: 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 work
2011-08-19 19:25 <cedk> dfamorato: 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 Tryton
2011-08-19 19:26 <dfamorato> cedk: i don't see that as a big drawback, since there is a
2011-08-19 19:26 <dfamorato> cedk: "sphinx conf generator"
2011-08-19 19:27 <cedk> dfamorato: but it doesn't keep custom change you did in the configuration
2011-08-19 19:27 <dfamorato> cedk: In, as i see it.... people shouldn't be installing modules out of nowhere......
2011-08-19 19:27 <cedk> dfamorato: and by default, generated configuration is bad
2011-08-19 19:27 <dfamorato> cedk: maybe i can have the conf build "update" a configuration if one exists..
2011-08-19 19:28 <dfamorato> cedk: the only thing i need to to is echo a new source and index into that configuration is a news module is added
2011-08-19 19:29 <cedk> dfamorato: yes but the only reason to have many indexes it is because id must be integer
2011-08-19 19:31 <dfamorato> cedk: 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 case
2011-08-19 19:32 <dfamorato> cedk: 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 advandatges
2011-08-19 19:33 <dfamorato> cedk: which also includes distributed search, since we can have indexes in other machines
2011-08-19 19:36 <cedk> dfamorato: can you create index on the fly?
2011-08-19 19:36 <dfamorato> yep
2011-08-19 19:37 <dfamorato> cedk: after you put it into sphinx.conf just run indexer -i index_name... the data will be indexed
2011-08-19 19:38 <cedk> dfamorato: without puting it in conf
2011-08-19 19:39 -!- smarro_(~sebastian@host100.190-136-175.telecom.net.ar) has joined #tryton
2011-08-19 19:43 <dfamorato> cant't be done
2011-08-19 19:45 -!- jcm(~jcm@99.12.194.77.rev.sfr.net) has joined #tryton
2011-08-19 19:45 -!- bechamel(~user@host-85-201-144-79.brutele.be) has joined #tryton
2011-08-19 19:46 <dfamorato> cedk: I am starving... any further questions before i leave for lunch ?
2011-08-19 19:46 <bechamel> cedk: another remark, it should be nice to provide auto-completion on each field value in the new search widget
2011-08-19 19:47 <bechamel> cedk: so "name:bertra", will trigger a sphinx search on the name field and suggest bertrand
2011-08-19 19:47 <bechamel> dfamorato: I have another question :)
2011-08-19 19:47 <dfamorato> bechamel: sure
2011-08-19 19:47 <bechamel> dfamorato: the xmlpipe doc talk about "arbitrary full-text and attribute data"
2011-08-19 19:48 <bechamel> dfamorato: is the per-model schema needed when we use only xmlpipe to index stuff ?
2011-08-19 19:48 <dfamorato> bechamel: if you send data that is not declared on the xml schema, the additional data will not be considered
2011-08-19 19:49 <dfamorato> bechamel: 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 stream
2011-08-19 19:50 <bechamel> dfamorato: 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"
2011-08-19 19:50 -!- peju(~moore@196.200.64.46) has joined #tryton
2011-08-19 19:51 -!- peju(~moore@196.200.64.46) has left #tryton
2011-08-19 19:52 <dfamorato> bechamel: 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 file
2011-08-19 19:52 <bechamel> dfamorato: not having to re-generate config when modules are installed would be really nice
2011-08-19 19:52 <bechamel> dfamorato: the easier to use, the best it is
2011-08-19 19:52 <dfamorato> bechamel: i told cedk that i could just echo the new source and index settings into the conf file in case a conf file exists
2011-08-19 19:53 <dfamorato> bechamel: so, that way, the conf file would always maintain any customization made to it
2011-08-19 19:55 <dfamorato> bechamel: 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 installed
2011-08-19 19:56 <dfamorato> bechamel: because if that is possible, I think i makes it "fool-proof" enought :)
2011-08-19 19:58 <bechamel> dfamorato: 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 file
2011-08-19 19:58 <dfamorato> bechamel: awesome...
2011-08-19 19:58 -!- peju(~moore@196.200.64.46) has joined #tryton
2011-08-19 19:58 <peju> hi all
2011-08-19 19:58 <bechamel> dfamorato: IMO you shouldn't bother too much on integration with the base, we can do it later
2011-08-19 19:59 <dfamorato> bechamel: I was just tryting to find a solution for you requests about the "new module" scenario
2011-08-19 20:00 <bechamel> dfamorato: yes, but imo this is the plan B, plan A being updating schema using the api and not the config file
2011-08-19 20:04 <dfamorato> bechamel: I don't see how to implement PLAN A unless we put everything into just 1 index.... Which I am strongly against
2011-08-19 20:06 -!- pjstevns(~pjstevns@helpoort.xs4all.nl) has joined #tryton
2011-08-19 20:06 -!- pjstevns(~pjstevns@helpoort.xs4all.nl) has left #tryton
2011-08-19 20:07 <dfamorato> bechamel: more questions before I go ? I should be back in 1 hour
2011-08-19 20:09 <bechamel> dfamorato: no, enjoy your meal
2011-08-19 20:09 <bechamel> ;)
2011-08-19 20:10 <dfamorato> bechamel: thanks... when I come back, i would like to address the concerns of the code review.... Talk to you soon
2011-08-19 20:11 <bechamel> dfamorato: ok, maybe i will be away for supper when you come back, but anyway most of the codereview remarks are from cedk :)
2011-08-19 20:12 -!- peju(~moore@196.200.64.46) has left #tryton
2011-08-19 20:15 <cedk> bechamel: did you understand that it is not possible to use one index because id must be unique
2011-08-19 20:15 <cedk> bechamel: and int
2011-08-19 20:19 -!- sharkcz(~sharkcz@2001:15c0:6747:160::7) has joined #tryton
2011-08-19 20:20 -!- okko1(~okko@dhcp-077-251-140-095.chello.nl) has joined #tryton
2011-08-19 20:23 <cedk> got an idea instead of generating the conf file with all the sources
2011-08-19 20:24 <cedk> we could just let the user define in this conf file what he wants to index
2011-08-19 20:24 <cedk> so when sphinx starts the xmlpipe_command, we store that it is indexing the defined Model
2011-08-19 20:25 <cedk> like that we can substitude ilike search only for indexed Model
2011-08-19 20:27 <cedk> and as xmlpipe2 doesn't need the fields or attributes, the conf is simple
2011-08-19 20:28 -!- helmor(~helmo@p57B60F5C.dip0.t-ipconnect.de) has joined #tryton
2011-08-19 20:31 -!- plantian1(~ian@c-67-169-72-36.hsd1.ca.comcast.net) has joined #tryton
2011-08-19 20:32 -!- dba_(~daniel@178.63.150.30) has joined #tryton
2011-08-19 20:33 -!- sebastian__(~sebastian@host100.190-136-175.telecom.net.ar) has joined #tryton
2011-08-19 20:44 -!- peju(~moore@196.200.64.46) has joined #tryton
2011-08-19 20:45 <peju> what IDE would you suggest for tryton development?
2011-08-19 20:45 <peju> i need it to do basic stuff like add fields in already existing modules
2011-08-19 20:56 -!- peju(~moore@196.200.64.46) has left #tryton
2011-08-19 21:09 <dfamorato> cedk: bechamel: I'm back
2011-08-19 21:10 <dfamorato> cedk: There is a tryton module which allows to select which models are supposed to be indexed..
2011-08-19 21:10 <dfamorato> cedk: you can select product.product or product.category and so on
2011-08-19 21:11 <dfamorato> cedk: after that you are supposed to run sphinx conf generator...
2011-08-19 21:11 <cedk> dfamorato: I thought it could be the opposite
2011-08-19 21:11 <dfamorato> cedk: sorry for not putting that on the readme... I will update documentation as well with th concerns on code review
2011-08-19 21:12 <cedk> dfamorato: like that there is no misconfiguration
2011-08-19 21:12 <dfamorato> cedk: You mean index all via sphinx by default ?
2011-08-19 21:14 <cedk> dfamorato: no I mean define what is indexed in sphinx conf only
2011-08-19 21:16 <dfamorato> cedk: having the user (integrador/admin..) define each model manually on sphinx config file ?
2011-08-19 21:16 <cedk> dfamorato: yes
2011-08-19 21:17 <cedk> dfamorato: and when sphinx query Tryton then you store the index in Tryton to know that you can use
2011-08-19 21:18 <dfamorato> cedk: sincerely, I think it's too cumbersome.... as it would force the user to know which model they should index
2011-08-19 21:19 <dfamorato> cedk: when I think it can be easily definable from the gtk client from a list
2011-08-19 21:19 <cedk> dfamorato: but your design can be broken in many places
2011-08-19 21:20 <cedk> dfamorato: with mine not because there is only one place where stuff are defined
2011-08-19 21:20 <cedk> moreover it should be not so complicated to create source because it is just 2 lines
2011-08-19 21:22 <cedk> also I think technical configuration doesn't have to be done in GTK client
2011-08-19 21:23 <cedk> especially if the user still have to run a script on the server side
2011-08-19 21:25 <dfamorato> cedk: 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 on
2011-08-19 21:25 <cedk> dfamorato: it is not the same stuffs
2011-08-19 21:26 <cedk> dfamorato: chart of account is business configuration, sphinx is technical configuration
2011-08-19 21:29 <cedk> it is just like you can not create index in postgresql from the GTK client
2011-08-19 21:30 <dfamorato> cedk: And from that we would make the user input what needs to indexed from a 200 possibilities of the models
2011-08-19 21:32 <cedk> dfamorato: but indeed there is only few Models that are useful to index
2011-08-19 21:32 <cedk> dfamorato: like product, party, sale, invoice etc.
2011-08-19 21:33 <helmor> see my new shirt, python 4 ever .. i wear every week once :-) http://www.flickr.com/photos/acidpix/6004496304/
2011-08-19 21:33 <helmor> >>> from __future__ import braces
2011-08-19 21:33 <helmor> SyntaxError: not a chance
2011-08-19 21:37 -!- hoRn(~jan@dslb-094-223-211-121.pools.arcor-ip.net) has joined #tryton
2011-08-19 21:38 <dfamorato> cedk: but about 1 hour ago, from what I understood from Bertrand, we should index Everything and All things, now we restrict to some things ?
2011-08-19 21:39 -!- cedk_(~ced@ced.homedns.org) has joined #tryton
2011-08-19 21:39 <dfamorato> bechamel: ping
2011-08-19 21:39 -!- cedk(~ced@gentoo/developer/cedk) has joined #tryton
2011-08-19 21:44 <bechamel> dfamorato: pong
2011-08-19 21:46 <dfamorato> bechamel: 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 bit
2011-08-19 21:46 <dfamorato> bechamel: Would you mind check the last 30 min of irc history ?
2011-08-19 21:49 -!- vladimirek(~vladimire@adsl-dyn18.91-127-76.t-com.sk) has joined #tryton
2011-08-19 21:50 <bechamel> dfamorato: cedk idea is good because it's always better to have only one source of knowledge, but I also think it's raise other problems
2011-08-19 21:51 <bechamel> imo 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 it
2011-08-19 21:52 <bechamel> indexing 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 compliquation
2011-08-19 21:55 <dfamorato> bechamel: 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 manually
2011-08-19 21:55 <cedk> bechamel: no because with xmlpipe2 the schema can be send
2011-08-19 21:55 <cedk> bechamel: so a module could extend it
2011-08-19 21:56 <dfamorato> cedk: bechamel: now the question is, which of the conf files will we store which models to index ?
2011-08-19 21:56 <bechamel> dfamorato: IMO the first step is ti handle function feild (this will give us some time to think about other stuffs)
2011-08-19 21:56 <dfamorato> cedk: bechamel: Sphinx.conf or trytond.conf ?
2011-08-19 21:56 <cedk> dfamorato: sphinx
2011-08-19 21:56 <dfamorato> bechamel: i think the function field will be easy to implement
2011-08-19 21:57 <dfamorato> i will test and let you guys know
2011-08-19 21:57 <bechamel> cedk: how do you want to extend config with modules ? you want to define schema statically in the sphinx config.
2011-08-19 21:58 <cedk> bechamel: I don't want to define the schema in shpinx config but in the xml send to it
2011-08-19 21:59 <cedk> http://sphinxsearch.com/docs/2.0.1/xmlpipe2.html
2011-08-19 21:59 <bechamel> cedk: ok but where to define which field to index ?
2011-08-19 22:00 <cedk> bechamel: Tryton will find it
2011-08-19 22:00 <cedk> bechamel: I propose as a first start to put only Char as field
2011-08-19 22:01 <bechamel> cedk: ok, I agree with ugins xmlpipe to define schema
2011-08-19 22:02 <bechamel> cedk: 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 ?
2011-08-19 22:02 <cedk> bechamel: with -i
2011-08-19 22:03 <dfamorato> bechamel: If you don't specify which index you are using, it will search across all indexes
2011-08-19 22:03 <cedk> bechamel: but he said that you can also query on all indexes
2011-08-19 22:03 <bechamel> I'm talking about indexing (not querying)
2011-08-19 22:03 <dfamorato> bechamel: same thing...
2011-08-19 22:04 <dfamorato> bechamel: -i index_name
2011-08-19 22:04 <dfamorato> bechamel: or --all to reindex all
2011-08-19 22:07 <cedk> dfamorato: it is not sphinx who trigger the indexing query?
2011-08-19 22:07 <dfamorato> cedk: nop, must be manual or via a cron
2011-08-19 22:08 <bechamel> I see that it's specified in the config generated by configuration.py
2011-08-19 22:08 <cedk> dfamorato: and then sphinx run the xmlpipe_command?
2011-08-19 22:09 <bechamel> cedk: so we are ok that we can define schema trough xml, but we still need to give sphinx the list of model names
2011-08-19 22:10 <dfamorato> cedk: because that is what generates the xml stream
2011-08-19 22:10 <cedk> bechamel: yes user must add in sphinx.conf the source definition
2011-08-19 22:11 <dfamorato> cedk: 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 data
2011-08-19 22:11 <cedk> dfamorato: ok I understand
2011-08-19 22:12 <dfamorato> bechamel: if we define schema through xml, good, no need to change my current design :)
2011-08-19 22:13 <cedk> dfamorato: I think it is better to put the schema code in the tryton module
2011-08-19 22:14 <dfamorato> cedk: I don't understand... please explain
2011-08-19 22:14 <bechamel> so the config is simply a list of model on which we want indexing, sound simple
2011-08-19 22:18 <bechamel> the question is : is sphinx api if we change the schema that is pushed trough xml ? (I.E. indexing stuff before and after module install)
2011-08-19 22:19 <bechamel> bbl
2011-08-19 22:19 <cedk> dfamorato: for now you generate the XML in a script that is run by sphinx
2011-08-19 22:19 <cedk> dfamorato: this script call trytond to get data
2011-08-19 22:20 <cedk> dfamorato: I think it is better that the script just call a method on trytond and trytond return the complete XML
2011-08-19 22:23 <dfamorato> cedk: I did the way it's done today because you guys requested that http://www.tryton.org/~irclog/2011-07-13.log.html#t2011-07-13_17:20
2011-08-19 22:25 <cedk> dfamorato: but it doesn't say that all the code must be in the script
2011-08-19 22:25 <cedk> dfamorato: it is more modular if the xml creation is done in the module because you can override it easily
2011-08-19 22:28 <dfamorato> cedk: I can't imagine any specific reason why we should overwrite the xml creation
2011-08-19 22:28 <cedk> also that's why we asked to every students to upload code in early stage because the dev process is made of iteration
2011-08-19 22:28 <cedk> dfamorato: I got many
2011-08-19 22:28 <cedk> dfamorato: a module that will add extra field to index
2011-08-19 22:29 <dfamorato> cedk: aren't all fields supposed to be indexed ?
2011-08-19 22:29 <cedk> dfamorato: a module that will add different language on the same record
2011-08-19 22:29 <cedk> dfamorato: for now only Char
2011-08-19 22:30 <dfamorato> cedk: Wasn't i supposed to create a different index by each language ?
2011-08-19 22:30 <cedk> dfamorato: yes but you don't know what other people will need
2011-08-19 22:30 <dfamorato> cedk: specially because of the morphology and stemming process, they are different for each language, and therefore, each index must be diffenret for each language
2011-08-19 22:31 <cedk> dfamorato: yes but you don't know what will be the usage of other people
2011-08-19 22:31 <cedk> we work like that in Tryton, because it is about framework
2011-08-19 22:32 <dfamorato> cedk: and today, char, text and selection are full text indexable
2011-08-19 22:34 <dfamorato> cedk: So you want the xml stream generator to be put into the tryton module ?
2011-08-19 22:34 <cedk> dfamorato: yes
2011-08-19 22:35 <cedk> ACTION bbl
2011-08-19 22:35 <dfamorato> cedk: and what else should this module do ?
2011-08-19 22:37 -!- woakas(~woakas@200.106.218.64) has joined #tryton
2011-08-19 22:40 <cedk> ACTION
2011-08-19 22:41 <cedk> dfamorato: there is still the random crawler
2011-08-19 22:41 <cedk> dfamorato: I don't know how you can manage it but perhaps the module should return some more random records
2011-08-19 22:42 <cedk> dfamorato: also I think you should try to use proteus to query the server like that you will get direct import and xml-rpc
2011-08-19 22:44 <bechamel> back
2011-08-19 22:56 -!- ciupicri(~ciupicri@81.180.234.249) has joined #tryton
2011-08-19 23:38 <dfamorato> cedk: bechamel: ping
2011-08-19 23:41 <bechamel> dfamorato: pong
2011-08-19 23:42 <dfamorato> i have updated the code to implement some of the things we discussed today
2011-08-19 23:42 <dfamorato> bechamel: pushed to code review
2011-08-19 23:44 <bechamel> dfamorato: ok
2011-08-19 23:45 <bechamel> dfamorato: I will check it tomorrow

Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!