1 2011-06-11T00:11:10  *** m4k3r has quit IRC
   2 2011-06-11T01:14:34  *** Gnarlodious has joined #moin-dev
   3 2011-06-11T01:16:22  *** Gnarlodious has quit IRC
   4 2011-06-11T01:17:49  *** Gnarlodious has joined #moin-dev
   5 2011-06-11T01:48:03  *** xjjk has quit IRC
   6 2011-06-11T01:49:59  *** xjjk has joined #moin-dev
   7 2011-06-11T01:55:51  *** sinha has joined #moin-dev
   8 2011-06-11T01:57:06  *** xjjk has quit IRC
   9 2011-06-11T02:08:44  *** xjjk has joined #moin-dev
  10 2011-06-11T03:38:31  *** sinha has quit IRC
  11 2011-06-11T03:38:41  *** sinha has joined #moin-dev
  12 2011-06-11T04:32:35  *** sinha has left #moin-dev
  13 2011-06-11T06:41:21  *** m4k3r has joined #moin-dev
  14 2011-06-11T08:41:50  *** m4k3r_ has joined #moin-dev
  15 2011-06-11T08:43:48  *** m4k3r has quit IRC
  16 2011-06-11T09:35:24  *** andialbrecht_ is now known as andialbrecht
  17 2011-06-11T09:47:59  <ThomasWaldmann> moin
  18 2011-06-11T11:15:34  *** andialbrecht is now known as andialbrecht_
  19 2011-06-11T12:13:09  <waldi> ah, now i see it. bitbucket == atlassian == confluence
  20 2011-06-11T12:23:30  *** ronny has quit IRC
  21 2011-06-11T12:24:58  *** ronny has joined #moin-dev
  22 2011-06-11T13:05:08  *** sinha has joined #moin-dev
  23 2011-06-11T13:12:32  <ThomasWaldmann> waldi: so?
  24 2011-06-11T13:23:30  <ThomasWaldmann> xorAxAx: no student diary entries last 3 days
  25 2011-06-11T13:24:45  <ThomasWaldmann> waldi: --""--
  26 2011-06-11T13:27:02  <xorAxAx> ThomasWaldmann: ok
  27 2011-06-11T13:27:07  <ThomasWaldmann> waldi: https://bitbucket.org/89hardy/pytest_moin/changeset/ce85e230826b see the great commit comment
  28 2011-06-11T13:32:03  <ThomasWaldmann> dreimark: last commit/push 4 days ago
  29 2011-06-11T13:36:55  <ThomasWaldmann> any native english speaker here?
  30 2011-06-11T13:37:10  <ThomasWaldmann> http://moinmo.in/4ct10n/diff/MoinMoinEtymology?action=diff&date=1303568502000000
  31 2011-06-11T13:38:27  <ThomasWaldmann> doesn't sound like valid english to me, I suspect some german tried to translate whatever he had in mind to english.
  32 2011-06-11T13:42:54  *** Marchael has joined #moin-dev
  33 2011-06-11T13:43:46  <Marchael> moin
  34 2011-06-11T13:45:31  <ThomasWaldmann> hi Marchael
  35 2011-06-11T13:49:05  <ThomasWaldmann> Marchael: you are working on the schema changes for the stuff still missing?
  36 2011-06-11T13:50:01  <ThomasWaldmann> it is all trivial stuff, so no big issue, should be done quickly
  37 2011-06-11T13:50:38  <Marchael> yes, It's not difficult
  38 2011-06-11T13:51:43  <Marchael> but it that really need to have all documents in one list?
  39 2011-06-11T13:53:03  <ThomasWaldmann> would reduce duplication i think. you could also use something similarly structured as a wiki storage
  40 2011-06-11T13:53:41  <ThomasWaldmann> i.e. a dict itemname -> item, and item is a list of revisions/documents
  41 2011-06-11T13:54:06  <Marchael> btw, may be use Item class?
  42 2011-06-11T13:54:21  <Marchael> from MoinMoin.items
  43 2011-06-11T13:54:30  <ThomasWaldmann> no, don't make it complicated
  44 2011-06-11T13:56:43  <Marchael> also, in which module of moin we need indexing incoming documents?
  45 2011-06-11T13:57:00  <Marchael> I found Item class, but not sure.
  46 2011-06-11T13:59:59  <ThomasWaldmann> if you mean on-the-fly indexing of stuff just saved: MoinMoin.storage.backends.indexing
  47 2011-06-11T14:00:41  <ThomasWaldmann> but i first want schema finished, why don't you concentrate on that and get it done now?
  48 2011-06-11T14:02:21  <Marchael> it just look in future :) I necessarily end with schema first
  49 2011-06-11T14:04:03  * ThomasWaldmann added some stuff to EP
  50 2011-06-11T14:05:59  <ThomasWaldmann> as a general rule: if you have stuff that can be fixed in a very short time (like minutes), do them immediately and remove them from your todo
  51 2011-06-11T14:11:22  <Marchael> http://paste.pocoo.org/show/403143/  40, I think it is correct, at least Matt recomends use Multifilter and different filters for quering and indexing in such case
  52 2011-06-11T14:12:27  <ThomasWaldmann> answer the question in 40
  53 2011-06-11T14:13:41  <ThomasWaldmann> if one can't explain why something should be in the index, it maybe should not be there
  54 2011-06-11T14:24:08  <Marchael> ThomasWaldmann: Imaginate, what we have page with name "SomePage" and whoosh parse this as [u'some', u'page'], it is correct. But if user forget exact name, he may just type "somepage" and whoosh parse this as [u'somepage']
  55 2011-06-11T14:24:08  <Marchael> And as you understand user never find this page, but with Multifilter we can use different analyzers for indexing and quering. In this case "SomePage" will be parsed as [u'some', u'page', u'somepage'] in indexing mode, and [u'some', u'page'] in query mode.
  56 2011-06-11T14:24:18  <Marchael> so we can improve search result
  57 2011-06-11T14:24:28  <ThomasWaldmann> Marchael: i looked at intrawordfilter and the merge params. while we maybe don't need some merges they do, we likely need them in other cases. So I guess we'll live with it "as is" for now and see how it behaves in practice.
  58 2011-06-11T14:26:32  <Marchael> ok
  59 2011-06-11T14:41:13  <Marchael> ThomasWaldmann:  if we'll using dict for all documents how we can store search result length with other data?
  60 2011-06-11T14:42:55  <ThomasWaldmann> you can store that in the test_cases data structure, per test
  61 2011-06-11T14:43:45  <ThomasWaldmann> you can refer from test_cases to the dict using documents["name"][revno] for example
  62 2011-06-11T14:44:54  <ThomasWaldmann> btw, are you going to mix all unrelated changes into a single unclean changeset again?
  63 2011-06-11T14:45:04  <ThomasWaldmann> or do we get clean changesets this time?
  64 2011-06-11T14:45:16  <Marchael> mm, may be queries will be good for it? like
  65 2011-06-11T14:45:16  <Marchael> queries = [
  66 2011-06-11T14:45:16  <Marchael>                    (u"item_name", u"Document", 2),
  67 2011-06-11T14:45:16  <Marchael>                    (u"uuid", u"68054804bd7141609b7c441143adf83d", 1),
  68 2011-06-11T14:45:24  <Marchael> sorry for long paste
  69 2011-06-11T14:46:41  <ThomasWaldmann> yes, pairing queries and expected results makes sense
  70 2011-06-11T14:46:43  <Marchael> ThomasWaldmann: you speak about analyzers
  71 2011-06-11T14:47:04  * ThomasWaldmann spoke about it in general
  72 2011-06-11T14:47:12  <Marchael> test_cases using for analyzers, not for testing indexing schema
  73 2011-06-11T14:48:04  <ThomasWaldmann> it is unclear what you want to know
  74 2011-06-11T14:48:22  <ThomasWaldmann> maybe do some own thinking, I'll be back in 15 mins
  75 2011-06-11T14:50:20  *** sinha has quit IRC
  76 2011-06-11T15:04:36  <Marchael> ThomasWaldmann: I thinking about dictonary for all documents in test_indexing.py. and I don't think what we can easy put documents to appropriate schemas, at least we need something way to know which document compliest selected schema.
  77 2011-06-11T15:06:21  <Marchael> Althought we could share queries, but using field with lenght result may confuse the search
  78 2011-06-11T15:06:37  <ThomasWaldmann> have a module level "document store", have test cases with query and expected result, what's the problem?
  79 2011-06-11T15:07:55  <ThomasWaldmann> and  make sure i just finds exactly what it should find
  80 2011-06-11T15:08:00  <ThomasWaldmann> it*
  81 2011-06-11T15:14:33  <Marchael> ThomasWaldmann: you mean http://paste.pocoo.org/show/404490/
  82 2011-06-11T15:14:37  <Marchael> ?
  83 2011-06-11T15:16:51  <ThomasWaldmann> yes, something like that. maybe use item name as first index and store a list of revs (revno 0,1,2,...), so you can use the revno as second index, if you need to.
  84 2011-06-11T15:19:13  *** sinha has joined #moin-dev
  85 2011-06-11T15:19:45  <ThomasWaldmann> maybe use "docs" as name for that. less to type when referring to it.
  86 2011-06-11T15:20:48  <Marchael> but did you see what all revs schema and latest revs schema have different set of field? And I guess if we try to put doc from "latest" to "all" we will have an error.
  87 2011-06-11T15:21:21  <Marchael> And how we'll add documents to index?
  88 2011-06-11T15:21:50  <ThomasWaldmann> well, you'll need code which handles such stuff anyway
  89 2011-06-11T15:22:02  <ThomasWaldmann> situation with wiki storage is not really different
  90 2011-06-11T15:27:06  <ThomasWaldmann> (and if it really IS a problem you could also just delete the unwanted keys on the fly)
  91 2011-06-11T15:27:47  <ThomasWaldmann> in a COPY of the dict, of course
  92 2011-06-11T15:30:29  <ThomasWaldmann> btw, if you think that this change is going to take longer than an hour, I want to first see committed and pushed clean changesets for all the trivial stuff I requested
  93 2011-06-11T15:35:55  <Marchael> ThomasWaldmann: http://paste.pocoo.org/show/404504/
  94 2011-06-11T15:42:02  <sinha> ThomasWaldmann: what is the solution for this error "python: /builddir/build/BUILD/Python-2.7/Modules/gcmodule.c:311: update_refs: Assertion gc->gc.gc_refs != 0' failed.`"
  95 2011-06-11T15:42:17  <sinha> i get this when i try to access global history page
  96 2011-06-11T15:55:54  <Marchael> ThomasWaldmann: http://paste.pocoo.org/show/404510/ is this good exmples of test docs?
  97 2011-06-11T15:58:20  * ThomasWaldmann filed https://bitbucket.org/mchaput/whoosh/issue/147/versioning-releasing-tagging
  98 2011-06-11T16:00:22  <ThomasWaldmann> http://paste.pocoo.org/show/404504/ ok, but this is not a clean changeset. commit it, but inform yourself about what a clean changeset is.
  99 2011-06-11T16:00:47  <ThomasWaldmann> xorAxAx: ^^
 100 2011-06-11T16:01:41  <ThomasWaldmann> http://paste.pocoo.org/show/404510/ that is not even valid python syntax
 101 2011-06-11T16:01:42  <CIA-69> Michael Mayorov <marchael@kb.csu.ru> * a3c707668331 r262 moin-2.0/MoinMoin/search/ (3 files in 2 dirs): Fix some name issues
 102 2011-06-11T16:02:30  <ThomasWaldmann> and why did you remove the name?
 103 2011-06-11T16:03:29  <Marchael> hm, forgot one comma
 104 2011-06-11T16:03:49  <Marchael> item_name? because key is document name.
 105 2011-06-11T16:03:52  <ThomasWaldmann> sinha: i have no idea about what you are doing to cause that error. in general, if you want help with some exception, post the full traceback, otherwise you won't get help.
 106 2011-06-11T16:04:45  <ThomasWaldmann> (and I won't repeat that every time)
 107 2011-06-11T16:04:59  <sinha> ThomasWaldmann: when i try to access the history page, moin crashes and i see this error on my terminal
 108 2011-06-11T16:05:08  <sinha> how could i post the traceback
 109 2011-06-11T16:05:31  <sinha> i had posted my complete code for review in which i was getting this error
 110 2011-06-11T16:05:57  <ThomasWaldmann> you can use paste.pocoo.org to paste tracebacks
 111 2011-06-11T16:06:17  <ThomasWaldmann> and if you want me to look at something, give an url
 112 2011-06-11T16:07:07  <sinha> this is my current code in which i am getting this error http://codereview.appspot.com/4592048 , also i am not getting any traceback, moin just stops
 113 2011-06-11T16:07:32  <ThomasWaldmann> ah, ok, because it is in c code
 114 2011-06-11T16:10:19  <Marchael> http://paste.pocoo.org/show/404514/ there is correct python code
 115 2011-06-11T16:19:52  <ThomasWaldmann> sinha: review done
 116 2011-06-11T16:20:15  <ThomasWaldmann> sinha: no idea about the error you get, but there are lots of other issues to fix
 117 2011-06-11T16:23:29  <ThomasWaldmann> Marchael: revno duplicates, name missing from dicts, toplevel keys (names) not unicode, usage of utcnow() strange
 118 2011-06-11T16:24:04  <ThomasWaldmann> and "Oh moin gott" is not "en"
 119 2011-06-11T16:24:16  <ThomasWaldmann> (and you should use english)
 120 2011-06-11T16:24:28  <sinha> ThomasWaldmann: what should i do then ?
 121 2011-06-11T16:24:34  <sinha> install new modules in virual env
 122 2011-06-11T16:24:41  <ThomasWaldmann> see the review
 123 2011-06-11T16:25:44  <ThomasWaldmann> we currently have no indication what is causing this error, it seems to be related to garbage collection and reference counting
 124 2011-06-11T16:26:16  <ThomasWaldmann> so i suggest you just fix all the trivial errors first
 125 2011-06-11T16:26:34  <sinha> okay
 126 2011-06-11T16:27:13  <Marchael> ThomasWaldmann: why utcnow() is strage? I use it because Matt recomendate this.
 127 2011-06-11T16:28:13  <ThomasWaldmann> the timestamp you get depends on the evaluation order python is evaluating that expression
 128 2011-06-11T16:28:37  <ThomasWaldmann> and, depending on granularity of utcnow() it could happen that you get same timestamp for everything
 129 2011-06-11T16:28:59  <ThomasWaldmann> which is usually not the case for different items, different revisions
 130 2011-06-11T16:31:02  <ThomasWaldmann> >>> datetime.utcnow(), datetime.utcnow(), datetime.utcnow()
 131 2011-06-11T16:31:02  <ThomasWaldmann> (datetime.datetime(2011, 6, 11, 14, 29, 26, 986103), datetime.datetime(2011, 6,
 132 2011-06-11T16:31:05  <ThomasWaldmann> 11, 14, 29, 26, 986117), datetime.datetime(2011, 6, 11, 14, 29, 26, 986124))
 133 2011-06-11T16:31:33  <ThomasWaldmann> well, you are lucky, at least the microseconds are different (on my laptop, at least)
 134 2011-06-11T16:32:26  <ThomasWaldmann> but still there might be an issue with evaluation order
 135 2011-06-11T16:33:58  <Marchael> and what should I do? Use other function for getting date?
 136 2011-06-11T16:34:23  <Marchael> s/other/another/
 137 2011-06-11T16:35:13  <ThomasWaldmann> just use any realistic date, it doesn't need to be current date
 138 2011-06-11T16:35:36  <ThomasWaldmann> and make it so older (lower) revisions have older datetime
 139 2011-06-11T16:40:13  <Marchael> ok
 140 2011-06-11T16:40:37  <Marchael> try to use this doc format for new test code
 141 2011-06-11T17:15:37  <Marchael> also, whoosh have some issues in documentation
 142 2011-06-11T17:16:08  <Marchael> http://packages.python.org/Whoosh/indexing.html#updating-documents there are some mistakes
 143 2011-06-11T17:16:54  <Marchael> import error and index.create_in("index") requeirs schema
 144 2011-06-11T17:17:52  <Marchael> they are rather obvious, but may confuse other people
 145 2011-06-11T17:44:49  <ThomasWaldmann> file bugs to whoosh bitbucket bug tracker
 146 2011-06-11T17:58:26  <xorAxAx> ThomasWaldmann: hmm?
 147 2011-06-11T18:06:07  <ThomasWaldmann> xorAxAx:                      "python: /builddir/build/BUILD/Python-2.7/Modules/gcmodule.c:311: update_refs: Assertion gc->gc.gc_refs != 0' failed.`"
 148 2011-06-11T18:06:16  <ThomasWaldmann> sinha has that issue, any ideas?
 149 2011-06-11T18:06:36  <xorAxAx> does he use C extensions?
 150 2011-06-11T18:08:13  <sinha> xorAxAx: what c extensions ?
 151 2011-06-11T18:08:50  <xorAxAx> sinha: any
 152 2011-06-11T18:10:28  <sinha> xorAxAx: i guess no
 153 2011-06-11T18:15:17  <Marchael> hm, strage. If whoosh schema has count of fields lesser than two, search result just show <Hit {}>
 154 2011-06-11T18:15:45  <Marchael> but for 3 and greater all ok
 155 2011-06-11T18:15:58  <xorAxAx> sinha: woosh is pure python?
 156 2011-06-11T18:16:01  <xorAxAx> whoosh
 157 2011-06-11T18:16:25  <Marchael> yes, but I no signa :)
 158 2011-06-11T18:16:30  <Marchael> *sihna
 159 2011-06-11T18:16:33  <Marchael> sorry
 160 2011-06-11T18:17:25  <Marchael> s/sihna/sinha/ :D
 161 2011-06-11T18:22:41  <ThomasWaldmann> xorAxAx: sinha does ui stuff, so moin, jinja2 mostly
 162 2011-06-11T18:23:48  <ThomasWaldmann> Marchael: no, i recently tested with just one field and nothing special happened
 163 2011-06-11T18:24:13  <Marchael> seems like I don't use Stored=True for fields
 164 2011-06-11T18:25:07  <sinha> ThomasWaldmann: in this { url_for('frontend.bookmark', time=current_timestamp) }} , what kind of i18n you expect here ?
 165 2011-06-11T18:25:42  <ThomasWaldmann> none
 166 2011-06-11T18:26:22  <sinha> and in this  <a href="{{ url_for('frontend.bookmark', time=del) }}">delete bookmark</a> | i will use del as a string for "del"
 167 2011-06-11T18:29:05  <ThomasWaldmann> del is a name, not a string.
 168 2011-06-11T18:33:02  <ThomasWaldmann> and maybe it would make sense using same datatype as the timestamp, so e.g. you could use 0 for clearing the bookmark
 169 2011-06-11T18:33:50  <ThomasWaldmann> which would even make the code much simpler if that also is the default for the value we get from userprofile
 170 2011-06-11T18:34:48  <ThomasWaldmann> because 0 == 1.1.1970 -> so if your bookmark is 0 it is the same effect as not having a bookmark
 171 2011-06-11T18:37:06  <sinha> but the already implemented code for the bookmark is done that way, it checks if the string is "del",  then deletes the bookmark otherwise sets it, so do you want me to change it ?
 172 2011-06-11T18:38:38  <ThomasWaldmann> yes, you could refactor that, in a separate commit maybe.
 173 2011-06-11T18:50:10  <Marchael> ThomasWaldmann: documents which strored in latest revs also stored in all revs indexes?
 174 2011-06-11T18:52:55  <Marchael> it'll be duplicate all documents in all revs indexes, but then we can increase speed when commit new document
 175 2011-06-11T19:03:27  * Marchael brb
 176 2011-06-11T19:03:34  *** Marchael has quit IRC
 177 2011-06-11T19:15:03  *** sinha has quit IRC
 178 2011-06-11T19:29:25  *** pkumar has joined #moin-dev
 179 2011-06-11T19:29:33  <pkumar> ronny: hi
 180 2011-06-11T19:30:36  <pkumar> ronny: http://moinmo.in/pkumar_diary/2011-06-09
 181 2011-06-11T19:33:24  <pkumar> ronny: Do you have any suggestions on how to proceed on it or any other suggestions for testing project?
 182 2011-06-11T19:40:37  <ThomasWaldmann> xorAxAx: ^^
 183 2011-06-11T19:43:00  <xorAxAx> pkumar: that doesnt explain memory leakage
 184 2011-06-11T19:43:12  <xorAxAx> just because something is created over andover again, mem usage doesnt incrase
 185 2011-06-11T19:43:45  <pkumar> xorAxAx: yeah, but it'll make the tests faster I guess
 186 2011-06-11T19:44:05  <xorAxAx> but your task is to hunt down the memory leak
 187 2011-06-11T19:45:00  <pkumar> xorAxAx : I am working on memory leakage too, but currently out of ideas. so thought of carrying this out too
 188 2011-06-11T19:45:34  <pkumar> xorAxAx : either way, it is a issue to be fixed
 189 2011-06-11T19:45:43  <pkumar> an*
 190 2011-06-11T19:45:56  <xorAxAx> pkumar: did you try a memory profiler?
 191 2011-06-11T19:46:03  <xorAxAx> there are various ones for python
 192 2011-06-11T19:49:36  <pkumar> xorAxAx : yeah, one you you had suggested.
 193 2011-06-11T19:49:51  <xorAxAx> which one did i suggest?
 194 2011-06-11T19:51:09  <pkumar> xorAxAx : cProfile
 195 2011-06-11T19:52:14  <xorAxAx> thats not a memory profiler
 196 2011-06-11T19:52:38  <xorAxAx> you cannot track downmemory leaks with a runtime profiler
 197 2011-06-11T19:53:17  <pkumar> xorAxAx : ok, it means that's a runtime profiler. sorry for that
 198 2011-06-11T19:54:17  <pkumar> xorAxAx : lemme try memory profiler then. any profiler you suggest?
 199 2011-06-11T19:54:36  *** Marchael has joined #moin-dev
 200 2011-06-11T19:55:08  <xorAxAx> no
 201 2011-06-11T19:55:20  <xorAxAx> i just know that there are at least 3 different ones
 202 2011-06-11T19:55:53  <pkumar> xorAxAx : yeah, I just got one, PySizer
 203 2011-06-11T19:58:26  <pkumar> xorAxAx : and what about the other problem of 'setup for wsgi app from scratch for every test method'
 204 2011-06-11T19:58:26  <pkumar> xorAxAx : any suggestions for that?
 205 2011-06-11T19:59:59  <xorAxAx> you should change it not to do that, indeed
 206 2011-06-11T20:09:34  <pkumar> xorAxAx : ok
 207 2011-06-11T20:29:34  <ThomasWaldmann> xorAxAx: frequent setup/teardown of the app might not be the root cause, but related to memory usage
 208 2011-06-11T20:30:05  <ThomasWaldmann> if a single app setup/teardown leaks a bit, frequently doing it will leak a lot
 209 2011-06-11T20:55:31  <Marchael> ThomasWaldmann: latest revs test and all revs test should share only documents or documents+queries?
 210 2011-06-11T20:56:55  <ThomasWaldmann> whatever works :)
 211 2011-06-11T20:58:22  <Marchael> sounds interesting
 212 2011-06-11T21:04:34  *** pkumar has quit IRC
 213 2011-06-11T21:09:41  <Marchael> seems like sharing querie is a bad idea
 214 2011-06-11T21:09:57  *** sinha has joined #moin-dev
 215 2011-06-11T21:37:29  <Marchael> ThomasWaldmann: before you see it, please excuse me. http://paste.pocoo.org/show/404645/
 216 2011-06-11T21:38:38  <ThomasWaldmann> use codereview
 217 2011-06-11T21:38:53  <ThomasWaldmann> and upload.py
 218 2011-06-11T21:40:53  <Marchael> http://codereview.appspot.com/4539114/patch/9005/8002
 219 2011-06-11T21:45:19  <ThomasWaldmann> algorithm
 220 2011-06-11T22:00:44  <ThomasWaldmann> review done
 221 2011-06-11T22:03:46  <sinha> ThomasWaldmann: this error "python: /builddir/build/BUILD/Python-2.7/Modules/gcmodule.c:311: update_refs: Assertion gc->gc.gc_refs != 0' failed.`" was coming when i try to pass more  params in render_template function , currently there are 3 when i add one more in that it throws this error ? any idea now
 222 2011-06-11T22:06:36  <ThomasWaldmann> Marchael: http://docs.python.org/reference/compound_stmts.html#the-with-statement if you read that, you see how you can avoid nesting 2 "with" if you do not really need nesting
 223 2011-06-11T22:07:16  <Marchael> ok
 224 2011-06-11T22:07:54  <ThomasWaldmann> sinha: no. and it sounds strange.
 225 2011-06-11T22:08:25  <ThomasWaldmann> sinha: if you fixed all errors I told you, update the codereview issue
 226 2011-06-11T22:08:46  <sinha> no i reverted back to my last working code
 227 2011-06-11T22:08:55  <sinha> and just tried to add this param
 228 2011-06-11T22:08:59  <sinha> it fails at this place
 229 2011-06-11T22:10:59  <ThomasWaldmann> didn't I say you should first fix the trivial stuff before trying again?
 230 2011-06-11T22:12:49  <ThomasWaldmann> show the diff between last working and crashing version
 231 2011-06-11T22:15:54  <sinha> okay
 232 2011-06-11T22:30:20  <ThomasWaldmann> so, where is it?
 233 2011-06-11T22:39:38  <sinha> ThomasWaldmann: sry for delay, i got it fixed, this is working now, please review such that i could push http://codereview.appspot.com/4592048/ Patch set 2
 234 2011-06-11T22:40:07  <sinha> the param name i was using as `bookmark`, i guess that was causing error
 235 2011-06-11T22:44:32  <Marchael> ThomasWaldmann: we have 4 documents in latest revs because changes are uncommited while we add documents to index
 236 2011-06-11T22:45:07  <Marchael> so we need commit() after each add_document()/update_document()
 237 2011-06-11T22:45:23  *** sinha has quit IRC
 238 2011-06-11T22:45:40  *** sinha has joined #moin-dev
 239 2011-06-11T22:46:55  <ThomasWaldmann> sinha: del, right?
 240 2011-06-11T22:47:12  <sinha> no that bookmark
 241 2011-06-11T22:47:23  <sinha> i have changed it to bookmark_time, and it worked
 242 2011-06-11T22:48:45  <ThomasWaldmann> Marchael: eh?
 243 2011-06-11T22:49:01  <Marchael> ThomasWaldmann: http://packages.python.org/Whoosh/indexing.html#updating-documents
 244 2011-06-11T22:49:23  <Marchael> > The “unique” field(s) must be indexed.
 245 2011-06-11T22:50:14  <ThomasWaldmann> so?
 246 2011-06-11T22:50:33  <Marchael> > so we need commit() after each add_document()/update_document()
 247 2011-06-11T22:50:54  <ThomasWaldmann> no you don't
 248 2011-06-11T22:51:41  <Marchael> then  (u"item_name", u"Document", 4, 4) is correct
 249 2011-06-11T22:51:55  <ThomasWaldmann> no, it is not, obviously
 250 2011-06-11T22:53:52  <ThomasWaldmann> (at least you do not need commit after each document for all_revs index)
 251 2011-06-11T22:54:03  <Marchael> ThomasWaldmann: do you understand what we have 4 documents because update_document() first delete given document from index them put new document. But we haven't any COMMITED indexes at this time
 252 2011-06-11T22:54:22  <ThomasWaldmann> (and if you'ld just add the latest rev for latest index, you would not need it there either)
 253 2011-06-11T22:54:30  <Marchael> s/indexes/documents/
 254 2011-06-11T22:55:11  <ThomasWaldmann> yes
 255 2011-06-11T22:56:43  <ThomasWaldmann> (for the tests with few docs it maybe doesn't matter much, but never commit after each doc for bulk indexing)
 256 2011-06-11T22:57:04  <Marchael> hm, so we leave 4?
 257 2011-06-11T22:58:01  <Marchael> may be write comment in test why I choosed this number
 258 2011-06-11T22:59:15  <Marchael> or commit changes only for latest_revs
 259 2011-06-11T22:59:45  <ThomasWaldmann> you leave what is correct
 260 2011-06-11T23:00:00  <ThomasWaldmann> and that is pretty obvious
 261 2011-06-11T23:00:51  <ThomasWaldmann> and if you need a comment, it is likely not correct
 262 2011-06-11T23:02:00  <Marchael> so, commit changes after each update_document()?
 263 2011-06-11T23:02:07  <ThomasWaldmann> yes
 264 2011-06-11T23:03:35  <ThomasWaldmann> alternatively, you could also just index the latest rev
 265 2011-06-11T23:08:29  <Marchael> ThomasWaldmann: please, review http://codereview.appspot.com/4539114
 266 2011-06-11T23:13:13  <ThomasWaldmann> Marchael: review done
 267 2011-06-11T23:13:18  <ThomasWaldmann> ehrm sinha ^^^
 268 2011-06-11T23:15:33  <sinha> thanks
 269 2011-06-11T23:16:29  <Marchael> > 0 comments
 270 2011-06-11T23:16:33  <Marchael> ThomasWaldmann: wtf?
 271 2011-06-11T23:16:37  <Marchael> :)
 272 2011-06-11T23:21:20  <Marchael> argh, it was for sinha :)
 273 2011-06-11T23:22:23  <sinha> Marchael: for what ?
 274 2011-06-11T23:23:40  <ThomasWaldmann> Marchael: review doen
 275 2011-06-11T23:23:42  <ThomasWaldmann> done
 276 2011-06-11T23:24:04  <Marchael> ok
 277 2011-06-11T23:25:31  <Marchael> sinha: I'm not immediately understood what ThomasWaldmann made review for you :)
 278 2011-06-11T23:27:06  <Marchael> ThomasWaldmann: > how can latest be more than all?
 279 2011-06-11T23:27:14  <Marchael> It's obvious
 280 2011-06-11T23:28:19  <Marchael> all_revs_schema hasn't itemlinks field. so I can put any numbers to this
 281 2011-06-11T23:28:59  <ThomasWaldmann> well, putting None would be more adequate then
 282 2011-06-11T23:29:01  <Marchael> same itemtransclusions and acl
 283 2011-06-11T23:29:07  <Marchael> ok
 284 2011-06-11T23:30:03  <Marchael> btw, we have finished with schema?
 285 2011-06-11T23:30:53  <Marchael> or just need check for result correction?
 286 2011-06-11T23:31:27  <ThomasWaldmann> you didn't add the missing fields yet
 287 2011-06-11T23:31:42  <ThomasWaldmann> but maybe first commit what you have, if tests work
 288 2011-06-11T23:32:46  <ThomasWaldmann> also, I'ld suggest you kill that "metadata" schema field for now, it is rather underspecified and unclear.
 289 2011-06-11T23:33:29  <CIA-69> Michael Mayorov <marchael@kb.csu.ru> * a46852031865 r263 moin-2.0/MoinMoin/search/_tests/test_indexing.py: Changes in test algorithm in test_indexing.py
 290 2011-06-11T23:34:51  <Marchael> ThomasWaldmann: which fields are missed?
 291 2011-06-11T23:34:58  <ThomasWaldmann> see EP
 292 2011-06-11T23:41:15  <CIA-69> Michael Mayorov <marchael@kb.csu.ru> * 779eee3e39d8 r264 moin-2.0/MoinMoin/search/ (_tests/test_indexing.py indexing.py): Removed "metadata" field from whoosh schema

MoinMoin: MoinMoinChat/Logs/moin-dev/2011-06-11 (last edited 2011-06-10 22:45:03 by IrcLogImporter)