Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
website
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gruppo Ask
website
Commits
0d04bdf5
Commit
0d04bdf5
authored
Aug 04, 2012
by
Giuseppe Terrasi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- disable sphinxfulltext modules - fix pgfulltext module
parent
6944eec2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
forum_modules/pgfulltext/handlers.py
forum_modules/pgfulltext/handlers.py
+2
-2
forum_modules/pgfulltext/pg_fts_install.sql
forum_modules/pgfulltext/pg_fts_install.sql
+4
-4
settings_local.py
settings_local.py
+3
-3
No files found.
forum_modules/pgfulltext/handlers.py
View file @
0d04bdf5
...
...
@@ -16,11 +16,11 @@ def question_search(self, keywords):
tables = ['
forum_rootnode_doc
'],
select={
'
ranking
': """
rank_exact_matches(ts_rank_cd('
{
0.1
,
0.2
,
0.8
,
1.0
}
'::float4[], "forum_rootnode_doc"."document", to_tsquery('
english
', %s), 32))
rank_exact_matches(ts_rank_cd('
{
0.1
,
0.2
,
0.8
,
1.0
}
'::float4[], "forum_rootnode_doc"."document", to_tsquery('
italian
', %s), 32))
""",
},
where=["""
"forum_rootnode_doc"."node_id" = "forum_node"."id" AND ("forum_rootnode_doc"."document" @@ to_tsquery('
english
', %s) OR
"forum_rootnode_doc"."node_id" = "forum_node"."id" AND ("forum_rootnode_doc"."document" @@ to_tsquery('
italian
', %s) OR
"forum_node"."title" ILIKE %s)
"""],
params=[tsquery, ilike],
...
...
forum_modules/pgfulltext/pg_fts_install.sql
View file @
0d04bdf5
...
...
@@ -54,15 +54,15 @@ begin
END
IF
;
SELECT
setweight
(
to_tsvector
(
'
english
'
,
coalesce
(
tagnames
,
''
)),
'A'
)
||
setweight
(
to_tsvector
(
'
english
'
,
coalesce
(
title
,
''
)),
'B'
)
||
setweight
(
to_tsvector
(
'
english
'
,
coalesce
(
body
,
''
)),
'C'
)
INTO
doc
setweight
(
to_tsvector
(
'
italian
'
,
coalesce
(
tagnames
,
''
)),
'A'
)
||
setweight
(
to_tsvector
(
'
italian
'
,
coalesce
(
title
,
''
)),
'B'
)
||
setweight
(
to_tsvector
(
'
italian
'
,
coalesce
(
body
,
''
)),
'C'
)
INTO
doc
FROM
forum_node
WHERE
id
=
root_id
;
SELECT
count
(
*
)::
int
INTO
rcount
FROM
forum_node
WHERE
abs_parent_id
=
root_id
AND
(
NOT
state_string
LIKE
'%%deleted%%'
);
IF
rcount
>
0
THEN
FOR
cv
in
SELECT
setweight
(
to_tsvector
(
'
english
'
,
coalesce
(
body
,
''
)),
'C'
)
FROM
forum_node
WHERE
abs_parent_id
=
root_id
AND
(
NOT
state_string
LIKE
'%%deleted%%'
)
LOOP
FOR
cv
in
SELECT
setweight
(
to_tsvector
(
'
italian
'
,
coalesce
(
body
,
''
)),
'C'
)
FROM
forum_node
WHERE
abs_parent_id
=
root_id
AND
(
NOT
state_string
LIKE
'%%deleted%%'
)
LOOP
doc
:
=
(
doc
||
cv
);
END
LOOP
;
END
IF
;
...
...
settings_local.py
View file @
0d04bdf5
...
...
@@ -46,7 +46,7 @@ SESSION_ENGINE = 'django.contrib.sessions.backends.db'
# This should be equal to your domain name, plus the web application context.
# This shouldn't be followed by a trailing slash.
# I.e., http://www.yoursite.com or http://www.hostedsite.com/yourhostapp
APP_URL
=
'http://
CHANGE_THIS_PATH
'
APP_URL
=
'http://
chiedi.ubuntu-it.org
'
#LOCALIZATIONS
TIME_ZONE
=
'Europe/Rome'
...
...
@@ -57,7 +57,7 @@ USE_I18N = True
LANGUAGE_CODE
=
'it'
DJANGO_VERSION
=
1.3
OSQA_DEFAULT_SKIN
=
'
defaul
t'
OSQA_DEFAULT_SKIN
=
'
ligh
t'
# disable mysqlfulltxt and local authentication (registrations users)
DISABLED_MODULES
=
[
'books'
,
'recaptcha'
,
'project_badges'
,
'mysqlfulltext'
,
'localauth'
,
'oauthauth'
,
'facebookauth'
]
DISABLED_MODULES
=
[
'books'
,
'recaptcha'
,
'project_badges'
,
'mysqlfulltext'
,
'localauth'
,
'oauthauth'
,
'facebookauth'
,
'sphinxfulltext'
]
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment