Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:rewind: Revert Document block sort value changed from `0` to `100` https://github.com/siyuan-note/siyuan/issues/12886

Daniel94f378aa553a
diff --git a/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-l3qg72k/20201222100339-i5hzcph.sy b/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-l3qg72k/20201222100339-i5hzcph.sy
index 21361de131..5ff061f46d 100644
--- a/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-l3qg72k/20201222100339-i5hzcph.sy
+++ b/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-l3qg72k/20201222100339-i5hzcph.sy
@@ -6,7 +6,7 @@
"id": "20201222100339-i5hzcph",
"title": "Database table",
"type": "doc",
- "updated": "20241024001049"
+ "updated": "20241024010556"
},
"Children": [
{
@@ -690,7 +690,7 @@
"HeadingLevel": 2,
"Properties": {
"id": "20201224120448-dd94dgz",
- "updated": "20241024001049"
+ "updated": "20241024010556"
},
"Children": [
{
@@ -714,7 +714,7 @@
},
"Properties": {
"id": "20210112165011-irm4wch",
- "updated": "20241024001049"
+ "updated": "20241024010556"
},
"Children": [
{
@@ -793,7 +793,7 @@
},
"Properties": {
"id": "20210112165011-n8zrkxm",
- "updated": "20241024001049"
+ "updated": "20241024010556"
},
"Children": [
{
@@ -825,7 +825,7 @@
"ListData": {},
"Properties": {
"id": "20210112165011-fodiphq",
- "updated": "20241024001049"
+ "updated": "20241024010556"
},
"Children": [
{
@@ -1244,7 +1244,7 @@
},
"Properties": {
"id": "20241024001039-ohxxgjo",
- "updated": "20241024001039"
+ "updated": "20241024010556"
},
"Children": [
{
@@ -1252,7 +1252,7 @@
"Type": "NodeParagraph",
"Properties": {
"id": "20241024001039-pm9zy3x",
- "updated": "20241024001041"
+ "updated": "20241024010556"
},
"Children": [
{
@@ -1262,7 +1262,7 @@
{
"Type": "NodeTextMark",
"TextMarkType": "code",
- "TextMarkTextContent": "100"
+ "TextMarkTextContent": "0"
},
{
"Type": "NodeText",
diff --git a/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180320-gyngv2x/20201222093044-rx4zjoy.sy b/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180320-gyngv2x/20201222093044-rx4zjoy.sy
index 28ce1f5254..82581fc56e 100644
--- a/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180320-gyngv2x/20201222093044-rx4zjoy.sy
+++ b/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180320-gyngv2x/20201222093044-rx4zjoy.sy
@@ -6,7 +6,7 @@
"id": "20201222093044-rx4zjoy",
"title": "数据库表",
"type": "doc",
- "updated": "20210210103236"
+ "updated": "20241024010538"
},
"Children": [
{
@@ -690,7 +690,7 @@
"HeadingLevel": 2,
"Properties": {
"id": "20201224120447-lezmdb3",
- "updated": "20210210103236"
+ "updated": "20241024010538"
},
"Children": [
{
@@ -714,7 +714,7 @@
},
"Properties": {
"id": "20201224120447-ij3ivd5",
- "updated": "20210210103236"
+ "updated": "20241024010538"
},
"Children": [
{
@@ -797,7 +797,7 @@
},
"Properties": {
"id": "20210112160050-sd8nvwk",
- "updated": "20210210103236"
+ "updated": "20241024010538"
},
"Children": [
{
@@ -829,7 +829,7 @@
"ListData": {},
"Properties": {
"id": "20210112160059-bc0lg2b",
- "updated": "20220312005741"
+ "updated": "20241024010538"
},
"Children": [
{
@@ -1248,7 +1248,7 @@
},
"Properties": {
"id": "20241024000917-3vhxi15",
- "updated": "20241024000917"
+ "updated": "20241024010538"
},
"Children": [
{
@@ -1256,7 +1256,7 @@
"Type": "NodeParagraph",
"Properties": {
"id": "20241024000917-xs7tchv",
- "updated": "20241024000921"
+ "updated": "20241024010538"
},
"Children": [
{
@@ -1266,7 +1266,7 @@
{
"Type": "NodeTextMark",
"TextMarkType": "code",
- "TextMarkTextContent": "100"
+ "TextMarkTextContent": "0"
},
{
"Type": "NodeText",
diff --git a/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226120933-vnjgwwh/20211226121808-fnxmngk.sy b/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226120933-vnjgwwh/20211226121808-fnxmngk.sy
index ab76ef8b2b..f1944b4d18 100644
--- a/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226120933-vnjgwwh/20211226121808-fnxmngk.sy
+++ b/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226120933-vnjgwwh/20211226121808-fnxmngk.sy
@@ -6,7 +6,7 @@
"id": "20211226121808-fnxmngk",
"title": "資料庫表",
"type": "doc",
- "updated": "20211228134348"
+ "updated": "20241024010548"
},
"Children": [
{
@@ -687,7 +687,7 @@
"HeadingLevel": 2,
"Properties": {
"id": "20211226121831-zvnhouv",
- "updated": "20211228134348"
+ "updated": "20241024010548"
},
"Children": [
{
@@ -702,7 +702,7 @@
"ListData": {},
"Properties": {
"id": "20211226121831-oj726eb",
- "updated": "20211228134348"
+ "updated": "20241024010548"
},
"Children": [
{
@@ -778,7 +778,7 @@
},
"Properties": {
"id": "20211226121831-zs0ji69",
- "updated": "20211228134348"
+ "updated": "20241024010548"
},
"Children": [
{
@@ -810,7 +810,7 @@
"ListData": {},
"Properties": {
"id": "20211226121831-6ak7dij",
- "updated": "20220312005849"
+ "updated": "20241024010548"
},
"Children": [
{
@@ -1229,7 +1229,7 @@
},
"Properties": {
"id": "20241024001004-awor1zs",
- "updated": "20241024001004"
+ "updated": "20241024010548"
},
"Children": [
{
@@ -1237,7 +1237,7 @@
"Type": "NodeParagraph",
"Properties": {
"id": "20241024001004-wtbxwea",
- "updated": "20241024001019"
+ "updated": "20241024010548"
},
"Children": [
{
@@ -1247,7 +1247,7 @@
{
"Type": "NodeTextMark",
"TextMarkType": "code",
- "TextMarkTextContent": "100"
+ "TextMarkTextContent": "0"
},
{
"Type": "NodeText",
diff --git a/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-a91lmk2/20240530101000-58z6rjh.sy b/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-a91lmk2/20240530101000-58z6rjh.sy
index 56a9f056d4..14b1c9b6d6 100644
--- a/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-a91lmk2/20240530101000-58z6rjh.sy
+++ b/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-a91lmk2/20240530101000-58z6rjh.sy
@@ -7,7 +7,7 @@
"id": "20240530101000-58z6rjh",
"title": "データベーステーブル",
"type": "doc",
- "updated": "20240530101000"
+ "updated": "20241024010606"
},
"Children": [
{
@@ -704,7 +704,7 @@
"Properties": {
"ID": "20240530101000-hotqrms",
"id": "20240530101000-214gvio",
- "updated": "20240530101000"
+ "updated": "20241024010606"
},
"Children": [
{
@@ -725,7 +725,7 @@
"Properties": {
"ID": "20240530101000-e9bmqha",
"id": "20240530101000-4hc7zl9",
- "updated": "20240530101000"
+ "updated": "20241024010606"
},
"Children": [
{
@@ -811,7 +811,7 @@
"Properties": {
"ID": "20240530101000-rsk9w3i",
"id": "20240530101000-7pu1enh",
- "updated": "20240530101000"
+ "updated": "20241024010606"
},
"Children": [
{
@@ -843,7 +843,7 @@
"ListData": {},
"Properties": {
"id": "20240530101000-8rv3wzu",
- "updated": "20240530101000"
+ "updated": "20241024010606"
},
"Children": [
{
@@ -1262,7 +1262,7 @@
},
"Properties": {
"id": "20241024001115-q3v9s9k",
- "updated": "20241024001115"
+ "updated": "20241024010606"
},
"Children": [
{
@@ -1270,7 +1270,7 @@
"Type": "NodeParagraph",
"Properties": {
"id": "20241024001115-xn6pni8",
- "updated": "20241024001115"
+ "updated": "20241024010606"
},
"Children": [
{
@@ -1280,7 +1280,7 @@
{
"Type": "NodeTextMark",
"TextMarkType": "code",
- "TextMarkTextContent": "100"
+ "TextMarkTextContent": "0"
},
{
"Type": "NodeText",
diff --git a/kernel/model/search.go b/kernel/model/search.go
index f9422088d1..ef4be5674f 100644
--- a/kernel/model/search.go
+++ b/kernel/model/search.go
@@ -945,7 +945,6 @@ func FullTextSearchBlock(query string, boxes, paths []string, types map[string]b
typeFilter := buildTypeFilter(types)
boxFilter := buildBoxesFilter(boxes)
pathFilter := buildPathsFilter(paths)
-
blocks, matchedBlockCount, matchedRootCount = fullTextSearchByKeyword(query, boxFilter, pathFilter, typeFilter, ignoreFilter, orderByClause, beforeLen, page, pageSize)
}
pageCount = (matchedBlockCount + pageSize - 1) / pageSize
diff --git a/kernel/sql/database.go b/kernel/sql/database.go
index 45482111d5..e35008e660 100644
--- a/kernel/sql/database.go
+++ b/kernel/sql/database.go
@@ -1445,7 +1445,7 @@ func nSort(n *ast.Node) int {
case ast.NodeAttributeView:
return 30
case ast.NodeDocument:
- return 100
+ return 0
case ast.NodeText, ast.NodeTextMark:
if n.IsTextMarkType("tag") {
return 205