On Wed, 2009-11-04 at 00:50 +0300, Alex Koshelev wrote:
> On Mon, Nov 2, 2009 at 11:54 PM, Ali Rıza Keleş
> <
ali.r...@gmail.com> wrote:
>
> On Mon, 2009-11-02 at 19:19 +0300, Alex Koshelev wrote:
> > Hi, Ali Rıza!
> >
> > Yes, query command shall not force to use slice. It is known
> issue [1]
> > and I'll fix it as soon as I can.
> >
>
> Thanks for your replying kindly. I wish to fix but I prefer to
> wait for
> your patch :). I need one more year to be interested in python
> to do it.
>
> I've done some fixes and just now you can try again to query with no
> slice specified.
OK. I tried it. And result is that
If I request one item, it works; but two doesn't.
Meanly
>>> query etha (works)
>>> query "etha istanbul" (works)
>>> query etha istanbul (does not work, give an error)
Terminal output as below.
>>> query etha
[<Hit: model=content.Content pk=305, percent=100 rank=0
weight=6.42380005352>, <Hit: model=content.Content pk=120, percent=96
rank=1 weight=6.
17325189522>, <Hit: model=content.Content pk=238,
percent=92 rank=2 weight=5.92355949336>, <Hit: model=content.Content
pk=198, percent=91 rank=3 weight=5.89642127426>, <Hit:
model=content.Content pk=96, percent=83 rank=4 weight=5.37230229927>,
<Hit: model=content.Content pk=360, percent=80 rank=5
weight=5.18220176636>]
>>> query "etha istanbul"
[]
>>> query etha istanbul
Traceback (most recent call last):
File "manage.py", line 11, in <module>
execute_manager(settings)
File
"/usr/lib/python2.5/site-packages/django/core/management/__init__.py",
line 439, in execute_manager
utility.execute()
File
"/usr/lib/python2.5/site-packages/django/core/management/__init__.py",
line 380, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File
"/usr/lib/python2.5/site-packages/django/core/management/base.py", line
195, in run_from_argv
self.execute(*args, **options.__dict__)
File
"/usr/lib/python2.5/site-packages/django/core/management/base.py", line
222, in execute
output = self.handle(*args, **options)
File
"/usr/lib/python2.5/site-packages/djapian/management/commands/indexshell.py", line 202, in handle
Interpreter(*args).cmdloop("Interactive Djapian shell.")
File "/usr/lib/python2.5/cmd.py", line 142, in cmdloop
stop = self.onecmd(line)
File "/usr/lib/python2.5/cmd.py", line 219, in onecmd
return func(arg)
File
"/usr/lib/python2.5/site-packages/djapian/management/commands/indexshell.py", line 16, in _decorator
return func(cmd, arg)
File
"/usr/lib/python2.5/site-packages/djapian/management/commands/indexshell.py", line 24, in _decorator
return func(cmd, *bits)
File
"/usr/lib/python2.5/site-packages/djapian/management/commands/indexshell.py", line 104, in do_query
print
list(self._current_index.search(query)[self._parse_slice(_slice)])
File
"/usr/lib/python2.5/site-packages/djapian/management/commands/indexshell.py", line 182, in _parse_slice
bits = map(int, [b for b in _slice.split(delimeter, 2) if b]) or
default
ValueError: invalid literal for int() with base 10: 'istanbul'
> Well, I want to be sure about one more thing. The same issue
> that is why
> my web application doesn't work, isn't it?
>
> I don't think so. I was local indexshell issue. Feel free to file new
> ticket or post your problem to mailing list.
Yes, I think I did some mistakes elsewhere. Because it still fails. The
worse is I don't see any error. Apache doesnt reply and fails. In apache
logs there is nothing. How can i traceback this process?
Thanks..
>
> ---
> Alex Koshelev
>
>
>
>
> >